Re: PDO and PGSQL: ERROR: syntax error at or near "SET"

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

 



Erik Gyepes wrote:
> ...
>   $query = "INSERT INTO users SET uid = :uid, login = :login, password =
> :password";
>   ...
> When running the script I get the following error message: Error!:
> SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "SET" at
> character 19
> 

The INSERT INTO ... SET ... syntax is not standard SQL.  It's a mysql
extension that isn't supported by any other sql databases, such as
postgresql.

The proper insert syntax is here:
http://www.postgresql.org/docs/8.0/interactive/dml.html#DML-INSERT


David

-- 
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