Re: call in to variables...

2010-12-23 Thread chris...@yahoo.com
Hi cricket, Thank You for your reply, speaking of "unique usernames"... in fact yes, they are all unique. i'm not quite understud what Amit meant to be,... yes they are all unique, and each user has its own Videos, Groups, Blogs, Profile, Business Profile, etc... and in order to favorite let say I

Re: call in to variables...

2010-12-23 Thread cricket
On Wed, Dec 22, 2010 at 8:56 PM, chris...@yahoo.com wrote: > > no there is no unique username, this is a social network site with > lots of users ;) I guess,... this still in construction... If username is not unique your favorites action will never work properly as it's only param is $username.

Re: call in to variables...

2010-12-22 Thread chris...@yahoo.com
and here what I have in models: I roow knoow knoow what's right what's wrong anymore... VALID_NOT_EMPTY, 'user_id' => VALID_NOT_EMPTY, 'category_id' => VALID_NOT_EMPTY, 'description' => VALID_NOT_EMPTY, 'embed_code' => VALID_NOT_EMPTY ); var $belongsTo = array(

Re: call in to variables...

2010-12-22 Thread chris...@yahoo.com
I have tried them all,... nothing seems working // $parent_id = $this->VideoFavorite- >findById($user['VideoFavorite']['parent_id']); // $parent_id = $this->User->field('id',array('username'=> $username)); // $parent_id = $this->Video->field('id',array('user_id'=> $user_id))

Re: call in to variables...

2010-12-22 Thread chris...@yahoo.com
Hi Amit, thanks again,... no there is no unique username, this is a social network site with lots of users ;) I guess,... this still in construction... and I'm building and adding Users Video Favorites Section, Group Favorites, Blog Favorites etc... And I think I have to call user_id or parent_id

Re: call in to variables...

2010-12-22 Thread Amit Rawat
Hi, Is your username unique? if yes then you can use this $parent_id=$this->User->field('id',array('username'=>$username)); Enjoy On Thu, Dec 23, 2010 at 6:48 AM, chris...@yahoo.com wrote: > Hi Amit, thank you for your help. But it didn't work. I may, as well > post the whole function here.

Re: call in to variables...

2010-12-22 Thread chris...@yahoo.com
Hi Amit, thank you for your help. But it didn't work. I may, as well post the whole function here. This is a favorites section that I'm trying to create. All I'm trying to do,... is call parent_id so I can link it to original video user username(profile) and video from view page favorites.ctp. If y

Re: call in to variables...

2010-12-22 Thread Amit Rawat
Hi Chris, Use find field $parent_id = $this->Video->field('user_id',array('your condition goes here')) enjoy, Amit On Thu, Dec 23, 2010 at 3:41 AM, chris...@yahoo.com wrote: > Hi All,... sound stupid but I have to ask... > I want to call user_id from Video table in to $parent_id variable in

call in to variables...

2010-12-22 Thread chris...@yahoo.com
Hi All,... sound stupid but I have to ask... I want to call user_id from Video table in to $parent_id variable in my controller in order to display and link to parent user username, video in ..."Favorites" section. And how do I do that...? Please help... $parent_id = $this->Video ??? thanks Chec