Error in page rendering in php
-
mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\binemorg\required\op_lib.php:689 Stack trace: #0 C:\xampp\htdocs\binemorg\required\op_lib.php(689): mysqli_num_rows(false) #1 C:\xampp\htdocs\binemorg\required\op_lib.php(277): get_multi_data('employee_attend...', Array, ' order by id de...') #2 C:\xampp\htdocs\binemorg\employee_attendance.php(8): insert_row('employee_attend...') #3 {main} thrown in C:\xampp\htdocs\binemorg\required\op_lib.php on line 689
-
mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\binemorg\required\op_lib.php:689 Stack trace: #0 C:\xampp\htdocs\binemorg\required\op_lib.php(689): mysqli_num_rows(false) #1 C:\xampp\htdocs\binemorg\required\op_lib.php(277): get_multi_data('employee_attend...', Array, ' order by id de...') #2 C:\xampp\htdocs\binemorg\employee_attendance.php(8): insert_row('employee_attend...') #3 {main} thrown in C:\xampp\htdocs\binemorg\required\op_lib.php on line 689
Paste the start of your error message into Google, or your preferred search engine, and you will find the hundreds of times this exact question has been asked before. The answer hasn't changed: mysql_query[^] returns
false
if the query fails. You need to test for that before trying to count the number of rows. As to why your query failed, that's up to you. You haven't shown any code, nor the structure of your database, so nobody can tell you what the problem with your query is.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer