Here is some code:
Model:
class Project extends AppModel {
var $name = 'Project';
var $primaryKey = 'project_id';
function customFunction($id=0){
$sql = custom sql... where project_id = ?;
$params = array( customValidation($id) );
On Thu, Dec 23, 2010 at 8:38 AM, Dan dannyetdi...@gmail.com wrote:
Here is some code:
Model:
class Project extends AppModel {
var $name = 'Project';
var $primaryKey = 'project_id';
function customFunction($id=0){
$sql = custom sql... where project_id = ?;
So far, I'm simply doing this:
$myarr = $this-query($sql, $params, false);
return $myarr[0];
I have to figure out what to do when there are no records returned.
The index is wrong when that happens.
On Dec 23, 2:50 pm, cricket zijn.digi...@gmail.com wrote:
On Thu, Dec 23, 2010 at 8:38 AM, Dan