开发者

SQL Error in Cakephp

im having an error in SQL using aCakephp like this:

    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 'getEventMessage' at line 1 [CORE\cake\libs\model\datasources\dbo_source.php, line 684]
    Code | Context

    DboSource::showQuery() - CORE\cake\libs\model\datasources\dbo_source.php, line 684
    DboSource::execute() - CORE\cake\libs\model\datasources\dbo_source.php, line 266
    DboSource::fetchAll() - CORE\cake\libs\model\datasources\dbo_source.php, line 410
    DboSource::query() - CORE\cake\libs\model\datasources\db开发者_StackOverflow社区o_source.php, line 364
    Model::call__() - CORE\cake\libs\model\model.php, line 502
    Overloadable::__call() - CORE\cake\libs\overloadable_php5.php, line 50
    User::getEventMessage() - APP\models\user.php, line 172
    User::afterSave() - APP\models\user.php, line 172
    Model::save() - CORE\cake\libs\model\model.php, line 1364
    UsersController::edit() - APP\controllers\users_controller.php, line 189
    Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 204
    Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 171
    [main] - APP\webroot\index.php, line 83

This is my scenario:

I have a User model, called a function from my custom behaviour named getEventMessage and everytime I call that function this error would occur.. and this function is called in User model's Aftersave function. I dont what is wrong but is it related to my database association??

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜