<?php
include_once("msaccessdb_win.inc.php");
//include_once("odbcdb.inc.php");
$db=new DB;
$db->open();
$sql="INSERT INTO test (name,age) VALUES('Harish',22)";
//$sql="UPDATE test SET name='sriram1' WHERE name='sriram'";
//$sql="DELETE FROM test WHERE id >=20";
$db->query($sql);
echo $db->error();
echo $db->affectedRows();
echo "<br>";
//echo $db->insertID();
$sql = 'Select id,name,age FROM test';
$db->query($sql);
//echo $db->error();
echo $db->numRows();
echo "<br>";
while($row=$db->fetchObject())
{
print_r($row->name);
echo "<br>";
}
$db->close();
?>
|