Hi All,

I'm new to CakePHP and I used the cake bake tool to generate my model
classes, controllers and views for a fairly complex data model.  One of my
model classes is returning the message below and appears to be sending
'setFlash' to the database as a query.  Can someone point me to where the
problem might be occurring so I can fix it.

Thanks,

Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'setFlash' at line 1
[CORE/cake/libs/model/datasources/dbo_source.php, line 512]

Code | Context

$sql    =       "setFlash"
$error  =       "1064: You have an error in your SQL syntax; check the manual 
that
corresponds to your MySQL server version for the right syntax to use near
'setFlash' at line 1"
$out    =       null

            $out = null;
            if ($error) {
                trigger_error("SQL Error: {$this->error}", E_USER_WARNING);

DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php,
line 512
DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line
202
DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php,
line 338
DboSource::query() - CORE/cake/libs/model/datasources/dbo_source.php, line
299
Model::call__() - CORE/cake/libs/model/model.php, line 397
Overloadable::__call() - CORE/cake/libs/overloadable_php5.php, line 59
Session::setFlash() - [internal], line ??
SessionsController::add() - APP/controllers/sessions_controller.php, line 24
Object::dispatchMethod() - CORE/cake/libs/object.php, line 114
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 256
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 230
[main] - /home/doychi/public_html/index.php, line 92


>From the query log produced in debug mode (I think):

25      SELECT `SessionsSession`.`session_id` FROM `sessions_sessions` AS
`SessionsSession` WHERE `SessionsSession`.`session_id` = 1              0       
0       0
26      setFlash        1064: You have an error in your SQL syntax; check the 
manual
that corresponds to your MySQL server version for the right syntax to use
near 'setFlash' at line 1                       0
-- 
View this message in context: 
http://www.nabble.com/Bad-SQL%3A--setFlash-tp19284992p19284992.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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