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] Link to comment https://forums.phpfreaks.com/topic/29692-mysql_query-issue/ 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 Link to comment https://forums.phpfreaks.com/topic/29692-mysql_query-issue/#findComment-136281 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] Link to comment https://forums.phpfreaks.com/topic/29692-mysql_query-issue/#findComment-136284 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 Link to comment https://forums.phpfreaks.com/topic/29692-mysql_query-issue/#findComment-136299 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 :-) Link to comment https://forums.phpfreaks.com/topic/29692-mysql_query-issue/#findComment-136303 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.