if(!($result=mysql_db_query("SELECT username FROM users" $db)))
{
print "Error getting rows";
exit();
}
while($row=mysql_fetch_array($result))
{
$username=$row["username"];
print "$username<br>";
}
mysql_free_result($result);
kp
==========================
Karl Phillipson
PHP SQL Programmer
Saffron Hill Ventures
67 Clerkenwell Road
London
EC1R 5BL
Saffron Hill: 0207 693 8300
Direct Line: 0207 693 8318
-----Original Message-----
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]]
Sent: 09 August 2001 12:14
To: '[EMAIL PROTECTED]'
Subject: [PHP] MySQL: Select ALL
When saying; mysql_query("SELECT username FROM users",$db); it only show's
one of the first users in the column "users".
Could someone please tell me how to make it print out the complete column
list of usernames. I have tried mysql_query("SELECT username(*) FROM
users",$db); - but no luck.
Thanks
Taz
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]