There may be a time when you want to simply just write your own custom sql in cakephp. Now, cakephp doesn’t want you to do this. The find() and save() calls should be able to do everything you need to do. But, I’ve found it useful to write custom sql queries for testing purposes. Here is how you do it.
$query = $this->ModelName->query("SELECT * FROM TableName");
good explain.
Comment by pankaj singh — September 6, 2010 @ 7:23 am
good explain and helpful aritical
Comment by kanij — August 7, 2011 @ 4:26 am
very very good and helpful for me.in cack php
Comment by kanij — August 7, 2011 @ 4:26 am
thanx
Comment by web developer — August 29, 2011 @ 6:32 am
FAIL. USE CAKE!!!
Comment by ryan — October 13, 2011 @ 9:06 am