Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

whats wrong with this?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

whats wrong with this?

Postby 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
New php-forum User
New php-forum User
Posts: 11
Joined: Thu Nov 14, 2002 7:13 am
Location: UK

Postby 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...
User avatar
Joan Garnet
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 [Bot] and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.