2
* EDIT:そのF indBy、私に「訂正コメント投稿をお願い致しますSQLのエラー、取得1064構文エラー
だから、イムに情報を扱うCakePHPの2のサーバースクリプトを実行していますアプリの「賞与」エリア。
$objAccount = $this->Account->FindById($Bonus['Account']['id']);
はエラーをオフに送信し、正確なコードをtheresの。そうでない作品BonusesComponent、でその。
</pre>Error: SQLSTATE[42000]: Syntax error or access violation: 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 'FindById' at line 1
#0 /var/www/secondcake/lib/Cake/Model/Datasource/DboSource.php(436): PDOStatement->execute(Array)
#1 /var/www/secondcake/lib/Cake/Model/Datasource/DboSource.php(403): DboSource->_execute('FindById', Array)
#2 /var/www/secondcake/lib/Cake/Model/Datasource/DboSource.php(646): DboSource->execute('FindById', Array, Array)
#3 /var/www/secondcake/lib/Cake/Model/Datasource/DboSource.php(588): DboSource->fetchAll('FindById', Array, Array)
#4 /var/www/secondcake/lib/Cake/Model/Model.php(776): DboSource->query('FindById', Array, Object(Account))
#5 /var/www/secondcake/app/Controller/Component/BonusesComponent.php(525): Model->__call('FindById', Array)
#6 /var/www/secondcake/app/Controller/Component/BonusesComponent.php(525): Account->FindById('83')
#7 /var/www/secondcake/app/Console/Command/CronTradeBonusesShell.php(24): BonusesComponent->EndBonus(Array)
#8 /var/www/secondcake/app/Console/Command/CronTradeBonusesShell.php(10): CronTradeBonusesShell->EndTradeBonuses()
#9 /var/www/secondcake/app/Console/Command/cronBase.php(105): CronTradeBonusesShell->cronMain()
#10 /var/www/secondcake/lib/Cake/Console/Shell.php(389): CronBase->main()
#11 /var/www/secondcake/lib/Cake/Console/ShellDispatcher.php(177): Shell->runCommand(NULL, Array)
#12 /var/www/secondcake/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#13 /var/www/secondcake/app/Console/cake.php(33): ShellDispatcher::run(Array)
スタックトレースを強調します。
について考えている人がいれば、という理由があります。私は非常に感謝しています。 FindByメソッドは、アプリケーション全体で正常に動作します。
** f ** indById \t \t – ndm
'var_dump($ this-> Account-> getDataSource() - > showLog()); – Beginner