Jump to content

Archived

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

Chevy

mysql_query problem...

Recommended Posts

Well I am making a friends system and I am stuck....

[code]
$fre = mysql_query("SELECT * FROM friends WHERE username_to='$player' || username_from='$player' && accepted='Yes'");
[/code]

and it doesn't work properly, any info?

Share this post


Link to post
Share on other sites
try this ok.
[code]
$fre = mysql_query("SELECT * FROM `friends` WHERE (`username_to`='$player') or (`username_from`='$player') and `accepted`='Yes'";
[/code]

Share this post


Link to post
Share on other sites
Use this:

[code]$fre = mysql_query("SELECT * FROM friends WHERE (username_to = '$player' OR username_from = '$player') AND accepted='Yes'");[/code]

Regards
Huggie

Share this post


Link to post
Share on other sites

×

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.