Re: newbie question ..

From: Date: Mon, 05 Jun 2000 15:28:02 +0000
Subject: Re: newbie question ..
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-203@lists.php.net to get a copy of this message
Hmm... without seeing your whole app, I don't know what the error could be... what does it say when you run it? Also... what happens if you put a print($sql) in there... I've found that acutally printing out the sql query can help find errors... -philip On Mon, 5 Jun 2000, Kenn Murrah wrote: > 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"); > > > ?> > > > > > >

« previous php.db (#203) next »