Chevy Posted October 9, 2006 Share Posted October 9, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/23434-mysql_query-problem/ Share on other sites More sharing options...
redarrow Posted October 9, 2006 Share Posted October 9, 2006 try this ok.[code]$fre = mysql_query("SELECT * FROM `friends` WHERE (`username_to`='$player') or (`username_from`='$player') and `accepted`='Yes'";[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23434-mysql_query-problem/#findComment-106283 Share on other sites More sharing options...
HuggieBear Posted October 9, 2006 Share Posted October 9, 2006 Use this:[code]$fre = mysql_query("SELECT * FROM friends WHERE (username_to = '$player' OR username_from = '$player') AND accepted='Yes'");[/code]RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/23434-mysql_query-problem/#findComment-106284 Share on other sites More sharing options...
Chevy Posted October 9, 2006 Author Share Posted October 9, 2006 Thank you it work excellent now Quote Link to comment https://forums.phpfreaks.com/topic/23434-mysql_query-problem/#findComment-106296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.