Atlas

Netter Reference
mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given (500 Whoops, looks like something went wrong.)

mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given

Exception

TypeError

  1.             $sql "SELECT zn.Z_PK,zn.ZPLATES,zn.ZTITLE,zn.ZTEXT,zn.ZCATEGORY,zn.ZDATE,zp.ZIMAGENAME from znote zn,zplate zp where $condition and zn.ZVERSION = '7e' and zn.ZPLATES = zp.Z_PK $catQuery order by zn.ZDATE DESC";
  2.            
  3.             //$sql = "SELECT zn.Z_PK,zn.ZPLATES,zn.ZTITLE,zn.ZTEXT,zn.ZCATEGORY,zn.ZDATE,zp.ZIMAGENAME from znote zn,zplate zp where zn.userid = '$userid' and zn.ZVERSION = '7e' and zn.ZPLATES = zp.Z_PK $catQuery order by zn.ZDATE DESC";
  4.             $result mysqli_query($this->db$sql);
  5.             $num_result mysqli_num_rows($result);
  6.             /* paging code start */
  7.             $pageNo $currPage;
  8.             $platesPerPage 10;
  9.             $totalPages ceil($num_result $platesPerPage);
  10.             $start = ($pageNo 1) * $platesPerPage;
  1.             $sql "SELECT zn.Z_PK,zn.ZPLATES,zn.ZTITLE,zn.ZTEXT,zn.ZCATEGORY,zn.ZDATE,zp.ZIMAGENAME from znote zn,zplate zp where $condition and zn.ZVERSION = '7e' and zn.ZPLATES = zp.Z_PK $catQuery order by zn.ZDATE DESC";
  2.            
  3.             //$sql = "SELECT zn.Z_PK,zn.ZPLATES,zn.ZTITLE,zn.ZTEXT,zn.ZCATEGORY,zn.ZDATE,zp.ZIMAGENAME from znote zn,zplate zp where zn.userid = '$userid' and zn.ZVERSION = '7e' and zn.ZPLATES = zp.Z_PK $catQuery order by zn.ZDATE DESC";
  4.             $result mysqli_query($this->db$sql);
  5.             $num_result mysqli_num_rows($result);
  6.             /* paging code start */
  7.             $pageNo $currPage;
  8.             $platesPerPage 10;
  9.             $totalPages ceil($num_result $platesPerPage);
  10.             $start = ($pageNo 1) * $platesPerPage;
  1. }else{
  2.     $userId $app->getUserState('users.login.form.data.id');
  3.     $instuserId 0;
  4. }
  5. $objNotes = new myFolderController();
  6. $NotesResult $objNotes->getMyNotes($userId$currPage$currCat$instuserId);
  7. $NotesCategories $objNotes->getNotesCategories($userId$instuserId);
  8. ?>
  9. <!-- Tab jquery end -->  
  10. <article>
include_once('/srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/views/myFolder/myNotes.php') in /srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/index.php (line 37)
  1.             include("includes/controllers/searchController.php");
  2.             include_once("views/searchResult.php");
  3.     break;
  4.     case 'myNotes' 
  5.             include("includes/controllers/myFolderController.php");
  6.             include_once("views/myFolder/myNotes.php");
  7.     break;
  8.     case 'Lightbox' 
  9.             include("includes/controllers/myFolderController.php");
  10.             include_once("views/myFolder/manageLightbox.php");
  11.     break;

Stack Trace

TypeError
TypeError:
mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given

  at /srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/includes/controllers/myFolderController.php:36
  at mysqli_num_rows(false)
     (/srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/includes/controllers/myFolderController.php:36)
  at myFolderController->getMyNotes(null, 1, '', 0)
     (/srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/views/myFolder/myNotes.php:141)
  at include_once('/srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/views/myFolder/myNotes.php')
     (/srv/www/netter-live.iplatformsolutions/content/netter_atlas_7e/index.php:37)