but thats deprecated, sam!

u should always use the generic find(type, options)
where options contains conditions:

e.g.
find('first', array('conditions'=>array('username'=>$username)))



On 7 Jul., 05:42, Sam <s...@masterscommission360.com> wrote:
> Try ->findByUsername($username)
>
> On Jul 6, 9:38 pm, Louie Miranda <lmira...@gmail.com> wrote:
>
>
>
> > Can I change $id on ->read(null, $id) to $username or something?
>
> > The code at:http://bin.cakephp.org/view/700064814
>
> > Tries to change the id to username, but I am not sure if this is the correct
> > one. I checked the api but, it seems it is not working. I am on 1.3.
>
> > The SQL is still finding the id, instead of the one I wanted.
>
> > SELECT `Account`.`username` FROM `mygps_profile` AS `Account` LEFT JOIN
> > `auth_users` AS `User` ON (`Account`.`auth_user_id` = `User`.`auth_user_id`)
> > WHERE `Account`.*`id`* = 'lo...@example.com' LIMIT 1
>
> > I wanted the *`id`* to become *`username`* instead. Not sure if this is
> > possible using read().
>
> > Regards,
> > --
> > Louie Miranda
> > - Email: lmira...@gmail.com
> > - Web:http://www.louiemiranda.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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