RE: [PHP] Help w/ "join" syntax

From: Date: Mon, 11 Mar 2002 14:48:15 +0000
Subject: RE: [PHP] Help w/ "join" syntax
Groups: php.general 
Request: Send a blank email to php-general+get-88010@lists.php.net to get a copy of this message
What do you mean "it doesn't work?" What results are you getting? Specifics...we need specifics... -----Original Message----- From: Anthony Rodriguez [mailto:sbwi@bellatlantic.net] Sent: Monday, March 11, 2002 6:44 AM To: php-general@lists.php.net Subject: [PHP] Help w/ "join" syntax When I call the following script, $qry_1 doesn't work (No Query # 1!). <?php set_time_limit(300); $connection=mysql_connect("localhost","wagner","???") or die ("No connection!"); $db=mysql_select_db("sbwresearch",$connection) or die ("No database!"); $qry_1="select first_name.con_inf, ... zip.con_inf, label.svy_149 from con_inf, svy_149 where con_inf.username=svy_149.username"; $result_1=mysql_query($qry_1,$connection) or die ("No query # 1!"); while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC)) { $first_name=$row_1["first_name"]; ... $zip=$row_1["zip"]; $label=$row_1["label"]; if ($label=="n") { $qry_2="insert into address_149 ( first_name, ..., zip) values ( \"$first_name\", ..., \"$zip\" )"; $result_2=mysql_query($qry_2,$connection); }; }; mysql_free_result($result_1); mysql_close($connection); echo "<b>DONE</b>"; flush(); exit; ?> Thanks! Anthony F. Rodriguez (afrodriguez@att.net) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#88010) next »