Hi everybody.I have a question ,if anybody know then please solve my
query.
I have a model class named 'Customer' and controller class of it
'Customers_controller'.
earlier i was using query() in my controller class but after reading a
post now i m using it in my model class like --

In controller class:-
$this->Customer->changepass($pass,$id);
where $pass is password and $id is id.

now in model class:-
function changepass($pass,$id)
{
 $this->query("UPDATE customers SET password='$pass' WHERE
id='$id'");
return;
}

This is working well,but if i want to run query on another table then
how can i do this?
Suppose i want to run update query on inventory table in customer
model , then how will i do this in model class?is there any other
changes will occur except query() ?

Sorry for my English because my English is not so good.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to