我使用find从数据库中检索数据,如下所示:
$test = $this->VevD01VevDateYears->find('first', array(
'conditions' => array('VevD01VevDateYears.D01_Vev_Type' => 1)
));
预期的数组假设是这样的:
Array
(
[VevD01VevDateYears] => Array
(
[D01_Vev_Type] => 1
[D01_Vev_Years] => 2014
[D01_Vev_Date_Pub] => 2014-12-05 00:00:00
)
)
而不是上面的数组我得到了这个奇怪的数据:
Array
(
[0] => Array
(
[VevD01VevDateYears__D01_Vev_Ty] => 1
[VevD01VevDateYears__D01_Vev_Ye] => 2014
[VevD01VevDateYears__D01_Vev_Da] => 2014-12-05 00:00:00
)
)
我没有发现查询有任何问题,当我从其他表中检索数据而没有弄乱键时,它返回正确的数组。这个出了什么问题?