Re: [PHP] MySQL: Select ALL

2001-08-09 Thread B. van Ouwerkerk


  but no luck.

Take a look at one of the tutorials.. Many can be found on the links page 
you can click to on www.php.net
This will help you to find the info you need and also answer the next 
question you're going to ask.

Bye,



B.


-- 
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]




Re: [PHP] MySQL: Select ALL

2001-08-09 Thread Daniel Rezny

Hello Tarrant,

Thursday, August 09, 2001, 1:14:25 PM, you wrote:

TC When saying; mysql_query(SELECT username FROM users,$db); it only show's
TC one of the first users in the column users.
TC Could someone please tell me how to make it print out the complete column
TC list of usernames. I have tried mysql_query(SELECT username(*) FROM
TC users,$db); - but no luck.

For example:
$query=mysql_query(SELECT username FROM users,$db);
while ($row=mysql_fetch_array($query)) {
  echo $row[username];
}

And B. van Ouwerkerk is right with his suggestion about manuals and
archive. I know that this problem was here a lot of times.

But anyway I hope it helps

-- 
Best regards,
 Danielmailto:[EMAIL PROTECTED]



-- 
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]




RE: [PHP] MySQL: Select ALL

2001-08-09 Thread Karl Phillipson

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 $usernamebr;
}

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]