I am working in Cake 1.2 with PHP5 and a postgres backend DB. When I
try to create records in any app I have tried, I get a warning then an
SQL error. The record seems to be created in the db, but with my
limited knowledge, it looks to me like cake is constructing an
incomplete SQL statement when trying to retrieve the ID of the record
just written.

Output is like:

Warning (2): pg_query() [function.pg-query]: Query failed: ERROR:
relation "public" does not exist [CORE/cake/libs/model/datasources/dbo/
dbo_postgres.php, line 122]

Code | Context
$sql    =       "SELECT last_value AS max FROM "public""
 */
    function _execute($sql) {
        return pg_query($this->connection, $sql);

pg_query - CORE/cake/libs/model/datasources/dbo/dbo_postgres.php, line
122
DboPostgres::_execute() - CORE/cake/libs/model/datasources/dbo/
dbo_postgres.php, line 122
DboPostgres::execute() - CORE/cake/libs/model/datasources/
dbo_source.php, line 155
DboPostgres::fetchRow() - CORE/cake/libs/model/datasources/
dbo_source.php, line 269
DboPostgres::lastInsertId() - CORE/cake/libs/model/datasources/dbo/
dbo_postgres.php, line 355
DboPostgres::create() - CORE/cake/libs/model/datasources/
dbo_source.php, line 500
JobHistory::save() - CORE/cake/libs/model/model.php, line 1234
JobHistoriesController::add() - APP/controllers/
job_histories_controller.php, line 23
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 265
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 237
[main] - APP/webroot/index.php, line 84
Query: SELECT last_value AS max FROM "public"

Any suggestions?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to