Usually Use In Cakephp

Below are the things I usually use in Cakephp 1.3

1. Creating another instance of “model” within controller or model.

$oModelName = ClassRegistry::init(‘ModelName’);

$results = $oModelName->find(‘all’);

2. Delete with conditions

$this->ModelName->deleteAll(array(‘ModelName.field_name’ => $someValue));


Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

You must be logged in to post a comment.