piyushsharmajec wrote:
> I have Project model in which function is as.... 
>
> function getMsgCount($id)
>               {
>                       $this->id = $id;
>                       
>                       return $this->query("SELECT count(*) as countval FROM 
> messages where
> project_id=$id AND status='1'");
>               }
>
>   
function getMsgCount($id){
    $this->find('count', $conditions);
}
> In Project Controller code is..
>
> function getCount($id = null)
>       {
>                                  $numval = $this->Project->getMsgCount($id);
>                                    $this->set('numval',$numval);      
>                                  $this->redirect(array('action'=>'index'));
>       }
>   
function getCount($id){
    $this->set('numval', $this->Project->getMsgCount());
}
> How to get result in view file? if i can pass numval through url or directly
> access variable. Please help! 
>
>
>   
Not tested. Might not work but will get you started.
http://book.cakephp.org/view/73/Retrieving-Your-Data


--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to