For some reason this function only prints the last three rows, even though are four, I am positive there are four becuase when I execute: SELECT * FROM beta_security in PHPmyAdmin it shows four, and I know there are four there, heck even the echo in the functions says there are four...
This is strange...
So, to test further, I ordered by a column and set to "desc" this returned the first three rows...
I am not completely new to PHP, I had system for accessing mySQL that seemed to being working fine until this little problem. I am probably just missing something small, but the fact that SQL statement is so bloody simple makes me wonder what is happening...
<?php
function displayusertable()
{
global $site; global $folder;
global $itemstable;
global $customtable;
global $securitytable;
//$userGrab = mysql_query("SELECT * FROM $securitytable WHERE (xstatus = 'active')");
$userGrab = mysql_query("SELECT * FROM beta_security");
$row = mysql_fetch_array($userGrab);
echo mysql_num_rows($userGrab);
while($row = mysql_fetch_array($userGrab))
{
include("secselectvariables.php");
print "<table>";
print "<tr>";
print "<td>";
print "$screenfirstname $screenlastname $accesslevel";
print "</td>";
print "</tr>";
print "</table>";
}
}
?>