ADODB Insert Question (Syntax)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

What is the proper way to get the ADODB class to automatically add quotes to the below sql ? I'm guessing that the below fails because none of the variables get quoted with the method, qstr.

$sql = "insert into email (to_name, to_email, from_name, from_email, subject, message, timestamp, ip) "; $sql .= "values ($to_name, $to_email, $from_name, $from_email, $subject, $message, $time, $ip)";


I tried something like the below to no avail
$sql .= "values($conn->qstr($to_name), $conn->qstr ($to_email), .......)";


Is there an accepted way to place multiple $variables inside an ADODB insert statement?

many thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux