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'");
}
In Project Controller code is..
function getCount($id = null)
{
$numval = $this->Project->getMsgCount($id);
$this->set('numval',$numval);
$this->redirect(array('action'=>'index'));
}
How to get result in view file? if i can pass numval through url or directly
access variable. Please help!
--
View this message in context:
http://www.nabble.com/Custom-Query-Result-tp21216264p21216264.html
Sent from the CakePHP mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---