botlife Posted September 6, 2009 Share Posted September 6, 2009 $cnt1 = mysql_num_rows($rs1); is generating the error. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in <? session_start(); $userid = $_SESSION['sess_id']; $sql1 = "select t_username,t_password,id from twitter_user where userid='".$userid."'"; $rs1 = mysql_query($sql1); $cnt1 = mysql_num_rows($rs1); if($cnt1 > 0) { Quote Link to comment https://forums.phpfreaks.com/topic/173346-need-quick-help-with-warning-mysql_num_rows-error/ Share on other sites More sharing options...
sKunKbad Posted September 7, 2009 Share Posted September 7, 2009 You have a bad query. Try running it directly on MySQL or phpMyAdmin and see that it is bad. Quote Link to comment https://forums.phpfreaks.com/topic/173346-need-quick-help-with-warning-mysql_num_rows-error/#findComment-913842 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.