hsekar Posted February 22, 2008 Share Posted February 22, 2008 Hi All...... i wanted to know if there is a way of accessing the results of a query from Cake PHP. This is my code $query = $this->Webapp->query("SELECT count(*) as count from webapps where mutId='$jobid'"); $cleaned_query = escapeshellcmd($query); $query_out = mysql_query($cleaned_query); How do I know what the count is now . How can I store the count in another variable. Need Help....its urgent ! Quote Link to comment Share on other sites More sharing options...
Neptunus Maris Posted February 22, 2008 Share Posted February 22, 2008 Cake is bad...bad... Quote Link to comment Share on other sites More sharing options...
KrisNz Posted February 22, 2008 Share Posted February 22, 2008 Theres a findCount function, I think it would look something like this $count = $this->Webapp->findCount(array("mutId"=>$jobid)); Your 2nd and 3rd lines of code baffle me though. You should read the manual page for escapeshellcmd(), since it's for an entirely different purpose than the one you're using it for. Go through the cake tutorials also. Quote Link to comment Share on other sites More sharing options...
hsekar Posted February 29, 2008 Author Share Posted February 29, 2008 thanks a lot Krisnz...yeah i went thru the manual for the escapeshellcmd..... i m new to php. thanks a lot for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.