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
https://forums.phpfreaks.com/topic/221789-num_rows/
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.