newbie question ..
| From: | Kenn Murrah | Date: | Mon, 05 Jun 2000 15:24:40 +0000 |
| Subject: | newbie question .. | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-202@lists.php.net to get a copy of this message | ||
Greeetings again....
Yesterday one of you gurus kindly provided a correction to my code to
help me write out the "salesperson_code" from the "salespersons" file
TO the "job_info" file.... (The change was the
"'$row[salesperson_code]'")
But I still can't get it to work ! Does anyone have other ideas?
Thanks so much for your help ... you folks are GREAT.
Kenn
<?php
mysql_connect ("localhost","root");
mysql_select_db ("bakergrfx");
$result = mysql_query("SELECT customer_code, customer_name,
customer.salesperson_code,
salesperson_name, csr from customer, salespersons
where customer.salesperson_code = salespersons.salesperson_code
and customer_code = '$customer_code'");
while($row = mysql_fetch_array($result)); } else {print "Sorry, no records
were found!";}
$sql = "INSERT INTO job_info (job_number, customer_code, salesperson_code)
VALUES ('$job_number', '$customer_code', '$row[salesperson_code]')
";
$result = mysql_query($sql) or die("ERROR -- this job number may already be
in use");
?>