Re: Check database

2011-01-11 Thread Stephen
You should look at this: http://book.cakephp.org/view/1017/Retrieving-Your-Data and this: http://book.cakephp.org/view/1031/Saving-Your-Data On 11 January 2011 09:52, Spha ps wrote: > Ok I will try this in the mean while but what I am doing is setting cookies > so that it recognises that spec

Re: Check database

2011-01-11 Thread Spha ps
Ok I will try this in the mean while but what I am doing is setting cookies so that it recognises that specific users details when they add info to the database so they enter their email among other things so thats why im using email to check for their details so that if they already exist then i a

Re: Check database

2011-01-11 Thread Stephen
Try using: $user = $this->User->find('first', array('conditions' => array('User.email' => $email_address))); Although in most applications it's usually best to get the current user's id from the auth component session data. i.e. $this->Auth->user('id'); Unless ofcourse you're doing something a l

Check database

2011-01-11 Thread Spha ps
Hi all, I was wonder how would i go about check the users table to see if an email exists if it does get that id to add a new post for that user ? thanks in advance Spha Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You receive