RE: [PHP] Plz help w/ query
| From: | Rick Emery | Date: | Thu, 31 Jan 2002 14:58:25 +0000 |
| Subject: | RE: [PHP] Plz help w/ query | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82936@lists.php.net to get a copy of this message | ||
Remove the MYSQL_ASSOC. I've never needed it for what you're doing:
while ($row_1=mysql_fetch_array($result_1))
-----Original Message-----
From: Anthony Rodriguez [mailto:sbwi@bellatlantic.net]
Sent: Thursday, January 31, 2002 7:30 AM
To: php-general@lists.php.net
Subject: [PHP] Plz help w/ query
The following query displays 0 e-mails. Why?
Tbl con_inf holds 51 records w/ 51 usernames. Tbl scr_149 holds 37
records with 37 equivalent usernames of which 14 show date_done=0.
<?php
$connection=mysql_connect("localhost","wagner","xxx") or die ("No
connection!");
$db=mysql_select_db("sbwresearch",$connection) or die ("No database!");
$qry_1="select con_inf.e_mail from con_inf, scr_149 where
scr_149.date_done=\"0\" AND con_inf.username=scr_149.username";
$result_1=mysql_query($qry_1,$connection) or die ("No query # 1!");
while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC))
{
$e_mail=$row_1["e_mail"];
echo "$e_mail\n";
};
mysql_free_result($result_1);
mysql_close($connection);
exit;
?>
Thanks!
Anthony F. Rodriguez
(afrodriguez@att.net)
--
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