chanchelkumar Posted February 23, 2008 Share Posted February 23, 2008 Hi all,, Am always getting this error in my linux server.... bUt no issue in my windows server!!! mysql_num_rows(): supplied argument is not a valid MySQL result resource Quote Link to comment Share on other sites More sharing options...
drisate Posted February 23, 2008 Share Posted February 23, 2008 You query is probably wroung. Can you post the query string inserted into mysql_num_rows Quote Link to comment Share on other sites More sharing options...
chanchelkumar Posted February 23, 2008 Author Share Posted February 23, 2008 <?php $usrid=$_GET['usrid']; $sessionvar=$_SESSION['usid']; connect_to_db(); $block="select * from cw_blocklists where blkd_userid=$sessionvar and blker_usid=$usrid"; $result=mysql_query($block)or die (mysql_error()); $rows=mysql_num_rows($result); if($rows>0) { ?> <script language="javascript"> alert("You are a Blocked user"); history.go(-1);//for go to just back of the page </script> <?php //header ("Location:client/blocked_message.php"); } else { **********my code goes here**** } Quote Link to comment Share on other sites More sharing options...
drisate Posted February 23, 2008 Share Posted February 23, 2008 Try this <?php $usrid=$_GET['usrid']; $sessionvar=$_SESSION['usid']; connect_to_db(); $block="select * from cw_blocklists where blkd_userid=$sessionvar and blker_usid=$usrid"; $result=mysql_query($block)or die (mysql_error()); if (mysql_num_rows($result)) { { ?> <script language="javascript"> alert("You are a Blocked user"); history.go(-1);//for go to just back of the page </script> <?php //header ("Location:client/blocked_message.php"); } else { **********my code goes here**** } 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.