Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. Error in page rendering in php

Error in page rendering in php

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
data-structuresphpdebugginghelp
2 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rahul Gupta Jan2022
    wrote on last edited by
    #1

    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

    Richard DeemingR 1 Reply Last reply
    0
    • R Rahul Gupta Jan2022

      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

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      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

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups