missing data from mysql...
Posted: Sat Apr 24, 2010 11:55 pm
Everytime I try to output things in a table from mysql, the first item is never displayed..... For example if I try to make a memberslist, just a basic list of names, and the first person's name is Joe the second is james and so forth. It completely skips Joe and starts with james.....
here is basicly what I'm doing. I know I don't need to get all from the database to display just the name but thats irrelevant..
This is just a basic example, but the problem persists throughout anything I try to put into a table, like inventory or store items....
here is basicly what I'm doing. I know I don't need to get all from the database to display just the name but thats irrelevant..
Code: Select all
///get the members info///
$memberinfo = "SELECT * from users ORDER BY id";
$memberinfo2 = mysql_query($memberinfo) or die("Could Not Get Memberinfo!");
$memberinfo3 = mysql_fetch_array($memberinfo2);
$name = $memberinfo3['name'];
////output into a table.. table borders and such are in a css file.../////
print "<center>";
print "<table>";
print "<tr><td>Members</td></tr>";
///while isn't needed in this example, but I put it anyways////
while($memberinfo3=mysql_fetch_array($memberinfo2))
{
print "<tr><td>$name</td></tr>";
}
print "</table>";
print "</center>";