That returns a record, not one string, right?

On Apr 17, 3:38 pm, fain182 <fain...@gmail.com> wrote:
> > <?php
> > $result = mysql_query('SELECT single_field FROM table WHERE id = 1
> > LIMIT 1');
> > $single_field_value_of_record_1 = mysql_result($result, 0,
> > 'single_field');
> > ?>
>
> $single_field_value_of_record_1 = $this->find('first', array(
> 'conditions'=>array(  'table.single_field'=> 1) ));
>
> the trick is the argument 'first' :http://book.cakephp.org/view/449/find
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to