Jump to content

Error, need help


hoi

Recommended Posts

Ermm, this is my error

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 'EXCEPT id = '1'' at line 1

and my script:

[code]$query = mysql_query ("SELECT * FROM `leden` WHERE email = '" . $_POST['email'] . "' EXCEPT id = '" . $_COOKIE['id'] . "' ") or die (mysql_error());[/code]

mja, ive got a script, and their u can edit ur email, but i want to select all the emails from the clan EXCEPT for the id of the member itself, how do i do it? :(
Link to comment
https://forums.phpfreaks.com/topic/26251-error-need-help/
Share on other sites

[quote author=thorpe link=topic=113930.msg463359#msg463359 date=1162759100]
[code=php:0]
$query = mysql_query("SELECT * FROM `leden` WHERE email = '" . $_POST['email'] . "' && id <> '" . $_COOKIE['id'] ."'") or die(mysql_error());
[/code]
[/quote]

ty m8, it worked ;)

[quote author=thorpe link=topic=113930.msg463362#msg463362 date=1162759495]
Yeah.. you can use either <> or !=

There is no such thing as EXCEPT.
[/quote]

lol, the except thing... i knew it was wrong, but with the word except, u guys would know what u mean, and give me the good answer ;) ty all
Link to comment
https://forums.phpfreaks.com/topic/26251-error-need-help/#findComment-120372
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.