Jump to content

Row list problem


SkyRanger

Recommended Posts

I am having a row list problem I have it working for one select but not others.

 

if ($resulta = $mysqli->query("SELECT * FROM users where userlevel='3' and valid='1' ")) {   ---line 200

   /* determine number of rows result set */
   $row_cnta = $resulta->num_rows;

   printf("%d", $row_cnta);

   /* close result set */
   $resulta->close();
}

/* close connection */
$mysqli->close(); ---line 212

 

This is the error I am getting


Warning: mysqli::query() [mysqli.query]: Couldn't fetch mysqli in /index.php on line 200

Warning: mysqli::close() [mysqli.close]: Couldn't fetch mysqli in /index.php on line 212

 

I am also going to have a resultb and $row_cntab for another count check. with userlevel = '4'

The first one I have is result and $row_cnt and that one works fine.

 

So it display

Userlevel 2 = 3 Users

Userlevel 3 = 5 Users

Userlevel 4 = 0 Users

Link to comment
https://forums.phpfreaks.com/topic/273208-row-list-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.