Page 1 of 1

whats wrong with this?

Posted: Tue Jan 21, 2003 3:51 am
by Mh_0
$sql = "DELETE FROM `sme` WHERE (`PI`='' && `Details`='' && `location`='')";
mysql_query($sql)or die("<b>Query Failed</b><br>\n".$sql."<br>\n".mysql_errno().": ".mysql_error());
}

the error message is:

Query Failed
DELETE FROM `sme` WHERE
1064: You have an error in your SQL syntax near '' at line 1

Posted: Tue Jan 21, 2003 6:11 am
by Joan Garnet
Try using this syntax:

Code: Select all

mysql_query " DELETE FROM sme WHERE PI='$my_pi' and Details='$my_details' and location='$my_location' ";

I think you are missing some info in the sample...