hi guys,... 
I can't save data in database,... I'm on cake 1.3 what am I doing wrong...? 
can anyone help please,....? 
thanks in advance 


          $this->Photo->create();
      if($this->Photo->save(array('Photo' => array('name' => $name, 
'user_id' => $this->user['id'], 'secret' => $secret, 'hidden' => 0, 
'privacy' => array_search($_GET['privacy'], 
Configure::read('Site.privacy'))))))
      { 
        $this->User->query('UPDATE fociki_users' .
        ' SET photos = photos + 1' .
        ', last_public_photo = (SELECT created FROM fociki_photos WHERE 
user_id = ' . $this->user['id'] . ' AND fociki_photos.privacy <= ' . 
array_search('public', Configure::read('Site.privacy')) .' ORDER BY created 
DESC LIMIT 1)' .
        ', last_friend_photo = (SELECT created FROM fociki_photos WHERE 
user_id = ' . $this->user['id'] . ' AND fociki_photos.privacy <= ' . 
array_search('friend', Configure::read('Site.privacy')) .' ORDER BY created 
DESC LIMIT 1)' .
        ' WHERE id = ' . $this->user['id']);
      }

-- 
Like Us on FacekBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to