Anthony, I'm inclined to agree with Rick, but that will not solve the problem - in fact I'll suggest using MySQL_fetch_assoc() instead!
What is the data type for the date_done column? If it is not a string type, then you don't want to enclose the zero-constant value in quotation marks. Do you know how many rows were returned by MySQL? Put in a call to num_rows to find out/as a debug aid. I don't know how the table is set up, etc, and wonder if there is an issue with case - e_mail is in lower case here; how does MySQL see it? Perhaps if you put in an AS clause to name the field/array element returned. Regards, =dn > Do away with that wretched MYSQL_ASSOC. I've seen it cause much pain and > misery. It is not needed. > > while ($row_1=mysql_fetch_array($result_1)) > > -----Original Message----- > From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 7:32 AM > To: [EMAIL PROTECTED] > Subject: 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 > ([EMAIL PROTECTED]) > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail ><[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php