taith Posted December 6, 2006 Share Posted December 6, 2006 when i do this, i get results regardless if state is 1 or 0[code]$result = mysql_query("SELECT * FROM instantmessenger WHERE `state`='0' AND `uid2`='$id' OR `uid1`='$id'") or die(mysql_error());echo mysql_num_rows($result);[/code] Quote Link to comment Share on other sites More sharing options...
craygo Posted December 6, 2006 Share Posted December 6, 2006 [code]try[code[$result = mysql_query("SELECT * FROM instantmessenger WHERE `state`='0' AND (`uid2`='$id' OR `uid1`='$id'")) or die(mysql_error());[/code]Ray Quote Link to comment Share on other sites More sharing options...
taith Posted December 6, 2006 Author Share Posted December 6, 2006 nope... then it doesnt find anything... everps. you made a typo[code]$result = mysql_query("SELECT * FROM instantmessenger WHERE `state`='0' AND (`uid2`='$id' OR `uid1`='$id')") or die(mysql_error());[/code] Quote Link to comment Share on other sites More sharing options...
craygo Posted December 6, 2006 Share Posted December 6, 2006 OK[code]$result = mysql_query("SELECT * FROM instantmessenger WHERE (`state`='0' AND `uid2`='$id') OR (`state`='0' AND`uid1`='$id')") or die(mysql_error());[/code]Ray Quote Link to comment Share on other sites More sharing options...
taith Posted December 6, 2006 Author Share Posted December 6, 2006 ok... never mind... i got it fixed :-) Quote Link to comment 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.