USE THE FOLLWOING IN UR CONTROLLER/MODEL

FOR GENERATING CUSTOM QUERIES...

$this->model name->query(" sql query here “ );


Eg:



$this->Employee->query("SELECT
employee_name,employee_ID,company,basic_salary FROM Employees WHERE
id='$id';"));


=>To access one model in another model for querying purpose use the foll



*Syntax:*

* *

$this->current model name -> reqd. model name ->query(“”);



Eg:



$this->Payroll->Employee->find('list', array('fields' =>
array('Employee.employee_name')));



$this->Payroll->Employee->query("SELECT
employee_name,employee_ID,company,basic_salary FROM Employees WHERE
id='$id';");





=>To save the data after form submission or insertion use the foll link:



http://book.cakephp.org/view/75/Saving-Your-Data


On Fri, Jul 10, 2009 at 10:17 AM, DigitalDude
<e.blumsten...@googlemail.com>wrote:

>
> Hey,
>
> you are right but I did not know how to make such an update-query with
> cake's built-in functions. If you could tell me how to update all
> entries in a table with a certain condition, please tell me,
> especially to the example I gave in my first post.
>
> Thanks in advance,
>
> DD
> >
>


-- 
-- 
(¨`•.•´¨) I may be busy,
`•.¸(¨`•.•´¨)  but I assure you,
(¨`•.•´¨)¸.•´ you are always in my heart
`•.¸.•´


With Lots of Love.....

THANKS AND REGARDS

Jeffery Jacob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to