Help selecting email

2009-08-16 Thread Dave Maharaj :: WidePixels.com

I keep getting an sql error when selecting an email in my query.
 
function __resetInfo($slug, $email, $token)

 {
  $params = array(
  'conditions' = array('User.slug' = $slug),
   'fields' = array('User.email' = $email, 'User.slug' =
$slug, 'User.reset' = $token),
  'contain' = false
   );
  
  $q = $this-find('first', $params);
 
 return $q;
 }
 
Query: SELECT `fr...@widepixels`.`com`, `User`.`testone`,
`User`.`4a88b705-2738-4b73-9c63-2aaa4adcd75b` FROM `users` AS `User .

Its breaking the email up at the .com

How can I query the $email from the db correctly?

Thanks,
 
Dave


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Help selecting email

2009-08-16 Thread Gonzalo Servat
On Mon, Aug 17, 2009 at 11:59 AM, Dave Maharaj :: WidePixels.com 
d...@widepixels.com wrote:


 I keep getting an sql error when selecting an email in my query.

 function __resetInfo($slug, $email, $token)

  {
  $params = array(
  'conditions' = array('User.slug' = $slug),
   'fields' = array('User.email' = $email, 'User.slug' =
 $slug, 'User.reset' = $token),
  'contain' = false
   );


[..snip..]

Hrm, the conditions looks right, but the fields argument should be an array
of fields to return? Sounds like you're mixing conditions in fields.

- Gonzalo

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---