Help!!!!!
I am writing several odbc applications at once. In each of them I have been able to do queries, update existing records etc but can't insert new records. I get no syntax errors but the information doesn't get added into the table.
I don't really want to go to 'classes' as i would have to rework quite a bit of code.
Hereis the cose so far:-
$dsn="hit_counter.dsn";
$usr="iusr";
$pass="pass";
$db=odbc_connect($dsn,$usr,$pass);
if (!$db) {
Echo "Unable to open db - $dsn<br>";
} else {
echo "New row - $row - $page - $num<br>";
$query="INSERT INTO pages ";
$query.="VALUES ID='99', page='$page', hits='$num' ";
$result=odbc_do($db,$query);
}
Thnaks in anticipation
Martin
I am writing several odbc applications at once. In each of them I have been able to do queries, update existing records etc but can't insert new records. I get no syntax errors but the information doesn't get added into the table.
I don't really want to go to 'classes' as i would have to rework quite a bit of code.
Hereis the cose so far:-
$dsn="hit_counter.dsn";
$usr="iusr";
$pass="pass";
$db=odbc_connect($dsn,$usr,$pass);
if (!$db) {
Echo "Unable to open db - $dsn<br>";
} else {
echo "New row - $row - $page - $num<br>";
$query="INSERT INTO pages ";
$query.="VALUES ID='99', page='$page', hits='$num' ";
$result=odbc_do($db,$query);
}
Thnaks in anticipation
Martin