我有以下法典:
$getmoney = Doctrine::getTable( Countries )->find(1);
$insertmoney = new Accounts();
$insertmoney->userid = $userid;
$insertmoney[$getmoney->getCurrency()] = $getmoney->getBaby();
$insertmoney->save();
Doctrine引起的询问是:
INSERT INTO accounts (1, userid, 2) VALUES ( 0 , 31 , 15 )
But it seems to have a 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 1, userid, 2) VALUES ( 0 , 31 , 15 ) at line 1
评分是:
INSERT INTO accounts (`1`, `userid`, `2`) VALUES ( 0 , 31 , 15 )
这件错误可能是一栏、编号的不幸名称。 我只得使用数字,因为这样做就更方便了adom。
在“<><>>之间有栏目名称的问询是什么?