Jump to content

num_rows


fife

Recommended Posts

ok really simple question.  I'm going blind staring at this code so can someone please help.  All I want to do is echo the number of rows in a table.  Here is the code

<?php

$qCheckFirstLog = "SELECT * FROM logindetails WHERE email = '".$_SESSION['email']."'";
$rCheckFirstLog = mysql_query($qCheckFirstLog);	
$num_rows = mysql_num_rows($rCheckFirstLog);

?>

Now there are 15 records with the session emails name in the table.  I know the session email is there as it echos an email if I ask it too so thats not missing but when I put

<?php echo $num_rows; ?>

 

I get nothing!!!!!!

 

Can someone please tell me what I'm doing wrong

 

Thank you

 

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.