Jump to content

Archived

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

xyn

MYSQL Error :/

Recommended Posts

Hey Guys.
I have a small problem with my SQL query, the error is:
[color=red]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 'inf_accept='1' AND inf_block='n' AND inf_friend='y'' at line 1[/color]

The code / sql line is:
[color=red]$sql = mysql_query("SELECT * FROM pm_buddy WHERE user_name='{$_SESSION['username']['usr_user']}' inf_accept='2' AND inf_block='y' AND inf_friend='n'")or die('ERROR:'.mysql_error().'');[/color]

does anyone know any problems? I checked few times,
tried renaming my syntax :/ nothings changed.

Share this post


Link to post
Share on other sites
Change it to:[code]SELECT * FROM pm_buddy WHERE user_name='{$_SESSION['username']['usr_user']}' AND inf_accept='2' AND inf_block='y' AND inf_friend='n'[/code]

Share this post


Link to post
Share on other sites
Sorry i just noticed what you did, i left out an "AND" between the user and the inf_accept...
thanks

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

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.