SQL values -> variables...
| From: | Tomasz Abramowicz | Date: | Thu, 04 Jan 2001 16:59:51 +0000 |
| Subject: | SQL values -> variables... | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-4809@lists.php.net to get a copy of this message | ||
hi.
little problem.
i have a script which pulls out info about users,
which 'possibly' have multiple email addresses.
I have written this to pull out the information,
but how do i create variables 'on the fly' to contain
the emails which might or might not be there?
<?
$query = "SELECT web_e.email FROM web_email web_e, users u WHERE u.user_id =
'tomasz'";
$result = mysql_query( $query )
or die( "query error: email." );
while ( $row = mysql_fetch_array( $result ) ) {
$email = $row[0];
}
?>
tnx,
Tomasz Abramowicz