Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
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
DELETE FROM `sme` WHERE
1064: You have an error in your SQL syntax near '' at line 1
-
Mh_0
- New php-forum User

-
- Posts: 11
- Joined: Thu Nov 14, 2002 7:13 am
- Location: UK
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...
-

Joan Garnet
- Moderator

-
- Posts: 387
- Joined: Sat Aug 03, 2002 2:56 am
- Location: Mars
-
Return to PHP coding => General
Who is online
Users browsing this forum: Google Feedfetcher and 1 guest