<?php
if (!empty($_GET['reads'])){
$result = mysql_query("UPDATE pm SET read='1' id='".mysql_real_escape_string($_GET['reads'])."'")
or die(mysql_error());
}
?>
This brings me back the following error message, when trying to use the link to call this.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read='1' id='137970'' at line 1
I am struggling to see why this is happening, when this code works perfectly fine with no issues ;
<?php
if (!empty($_GET['delete'])){
$result = mysql_query("UPDATE hd SET del='1' WHERE id='" .mysql_real_escape_string($_GET['delete']). "'")
or die(mysql_error());
} ?>
They are essentially the same apart from it is 'reads' on one and 'delete' on another...