开发者

Query by field name in cakephp

Hello I have a very simpl开发者_开发技巧e question, how do we query by field name?? I am using the regular query method, but I want to learn how it is done by one of the cakePHP methods, which would look like $this->Model->find('/*something like a query*/').

I am presently using the query method like $this->Model->query('select field_name from table_name');


$this->Model->find('all', array('fields' => array('field_name')));

You can find more on retrieving your data in the Cookbook.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜