![]() |
mysql_num_rows() expects parameter 1 to be resource
Hello,
i'm using query like that $result = mysql_query("SELECT * FROM workshop_months_records where month_date LIKE '$month_date' limit 1"); $result_num_row = mysql_num_rows($result); and this error return to me Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in ..../includes/class_postbit.php(289) : eval()'d code on line 103 Although the plugin was work perfectly on version 3 waiting for help thanks :) |
I guess that would happen if the query failed. Change the code to something like:
Code:
$result = mysql_query("SELECT * FROM workshop_months_records where month_date LIKE '$month_date' limit 1"); |
At least that masks the initial error, but you are right @kh99, there was always a chance that the query could return a Boolean. :)
|
Yeah, you're right, I should have been more clear in saying that my "fix" is really only testing for FALSE to avoid the error, but doesn't fix the problem.
|
the code work without problems in version 3 , and this error show white mysqli not mysql , so I expect that version 3 developed with mysqli , mysql_num_rows(); need $link parameter puls $result parameter , so i don't know how i can count the count of rows without the second parameter
--------------- Added [DATE]1401234837[/DATE] at [TIME]1401234837[/TIME] --------------- i will tray $result = mysql_query("SELECT COUNT(*) i hope it work |
All times are GMT. The time now is 04:59 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|