shamsuljewel Posted September 5, 2007 Share Posted September 5, 2007 it correctly run on php4 but I am now switch to php5 and give that error.. What was the problem? pleaseeeeeeeee help Quote Link to comment https://forums.phpfreaks.com/topic/68052-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/ Share on other sites More sharing options...
pocobueno1388 Posted September 5, 2007 Share Posted September 5, 2007 Show us your code. There is most likely a problem with your query. Quote Link to comment https://forums.phpfreaks.com/topic/68052-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/#findComment-342072 Share on other sites More sharing options...
shamsuljewel Posted September 5, 2007 Author Share Posted September 5, 2007 <code>$query="SELECT site_name, description, url FROM web WHERE MATCH(site_name, url, description) AGAINST ('%$keywords%')"; $result=mysql_query($query); $j=mysql_num_rows($result);</code> is that query wrong? Quote Link to comment https://forums.phpfreaks.com/topic/68052-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/#findComment-342076 Share on other sites More sharing options...
pocobueno1388 Posted September 5, 2007 Share Posted September 5, 2007 Change this line: $result=mysql_query($query); To: $result=mysql_query($query)or die(mysql_error()); That will tell you what the problem is. Quote Link to comment https://forums.phpfreaks.com/topic/68052-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/#findComment-342086 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.