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 Link to comment https://forums.phpfreaks.com/topic/92547-why-this-error-in-linux-server/ 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 Link to comment https://forums.phpfreaks.com/topic/92547-why-this-error-in-linux-server/#findComment-474215 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**** } Link to comment https://forums.phpfreaks.com/topic/92547-why-this-error-in-linux-server/#findComment-474219 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**** } Link to comment https://forums.phpfreaks.com/topic/92547-why-this-error-in-linux-server/#findComment-474226 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.