-
calling info from database
Hi..
i am trying to call ALL da usernames and teamname in my members table! it is only dispaying one username/teamname.
this is my code..
<?
include("connect2db.php");
$result = mysql_query("select teamname, username from members");
## Query detail specification ##
$row = mysql_fetch_array($result);
while ($row = mysql_fetch_array($result)){
// output teamname and a line break
echo $row['teamname'];
echo $row['username'];
echo $row[2]."<br>";
}
?>
any ideas how to display all information on username/teamname in table instead of just one row????
-
I am no PHP expert, hell - not even a beginner BUT I would say it looks like you can delete the row:
$row = mysql_fetch_array($result);
as you have it twice ( again in the loop ).
Hope that helped. Cheers.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|