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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.