My gosh that looks (over)complex ;).
>> $this->data['Input']['user']=$this->Input->query('SELECT email FROM
users WHERE name=\'michael\'');
You need something like:
$NameArray = $this->User->findByName('michael');
$this->data['Input']['user']=$NameArray['User']['email'];
Or even;
$this->data['Input']['user']=$this->User->field('email',
array('User.Name'=>'michael'));
That's assuming you have a User object in your Uses array, if not
$this->Input->User assuming that it is associated with Input (whatever
that is) and failing that... add it to the Uses array :).
HTH,
AD7six
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---