RE: [PHP] MySQL: Select ALL

From: Date: Thu, 09 Aug 2001 11:29:00 +0000
Subject: RE: [PHP] MySQL: Select ALL
Groups: php.general 
Request: Send a blank email to php-general+get-61977@lists.php.net to get a copy of this message
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:tcostelloe@insur-e.net] Sent: 09 August 2001 12:14 To: 'php-general@lists.php.net' 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#61977) next »