Hi,
I try and be thorough with any coding I do and this has had me confused for some time, so I thought I'd get some help.
The following "INSERT" writes a record to the table but I also get an error message (as shown below).
$sql=mysql_query("INSERT INTO pagehits (page,hits) VALUES ('$ads_page','1')");
if (!mysql_query($sql)) { echo "insert error:<br>".mysql_error(); die; }
insert error:
You have an error in your SQL syntax near '1' at line 1
- Why do I get this error
- Why does the record still get written if there is an error ?
Thanks