whats wrong with this?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 11
Joined: Thu Nov 14, 2002 7:13 am
Location: UK

whats wrong with this?

Post by Mh_0 » Tue Jan 21, 2003 3:51 am

$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
1064: You have an error in your SQL syntax near '' at line 1

User avatar
Joan Garnet
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Post by Joan Garnet » Tue Jan 21, 2003 6:11 am

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...

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests