RE: [PHP] Re: values from string query

2004-03-01 Thread Angelo Zanetti
HI, just to let you all know the curly brackets worked! -Original Message- From: Ben Ramsey [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 4:05 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] Re: values from string query You may want to try putting single

[PHP] Re: values from string query

2004-02-26 Thread Jakes
excape your variables like so in your insert statement - ' $a_row[p_company] ' (quick and dirty style), or the clean way ".$a_row['p_company'] ." "Angelo Zanetti" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > HI all I have a Select that get a resultset, once I get this then I use

[PHP] Re: values from string query

2004-02-26 Thread Ben Ramsey
You may want to try putting single quotation marks around your values and place your array values within curly braces... VALUES ('{$a_row['p_name']}', '{$a_row['p_company']}', ... and so forth. Also, try echoing $c_query to see if the values are being stored in the variable properly, if you ha

[PHP] Re: values from string query

2004-02-26 Thread Ben Ramsey
thanx yes i was echoing them and it worked!! Angelo Please remember to include the list on messages. Does this mean that your code now works? Or it still doesn't work but the values are being properly echoed? -- Regards, Ben Ramsey http://benramsey.com http://www.phpcommunity.org/wiki/Peopl

[PHP] Re: values from string query

2004-02-26 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 you may find "insert ... select" interesting for what you want hehe try this: $sql = "INSERT INTO client (c_name, c_company, c_worktel, c_directtel, c_hometel, c_fax, c_cell, c_email, c_address, c_city, c_pcode, c_country) SELECT p_name, p_compa

[PHP] Re: values from string query

2004-02-26 Thread André Cerqueira
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 oops i changed the name of a variable in one place and forgot the other... mysql_query($sql, $this->link) or die ("".mysql_error()); André cerqueira wrote: you may find "insert ... select" interesting for what you want hehe try this: $sql = "INSERT