0
我在CakePHP的查詢如下:如何閱讀查詢結果
lnguserID = 10;
$result = $this->Mymodel->find('all', array(
'fields' => array('Mymodel.intPhoneID'),
'conditions' => array('Mymodel.intUserid'=> $lnguserID)
));
當我調試的結果是這樣的:echo debug($result);
我得到:
array(
(int) 0 => array(
'Mymodel' => array(
'intPhoneID' => (int) 3975
)
)
)
哪有我從結果數組中直接訪問這個id
:3975
?類似於:
result['Mymodel']['intPhoneID'];
我想在其他查詢中使用它。
hhhhh,嗨,工作感謝。 – OussamaLord
如果它幫助請[接受我的答案](http://meta.stackexchange.com/questions/16721/how-does-accept-rate-work/65088#65088) – Kuf