Hello rb,

You are right that is the way to do it.
But my suggestion is that please dont break the basic conventions of
cakephp.
You have to write custom query at very high complex level otherwise there is
no need to use custom query.
So please check the update method in the model.

On Thu, Jul 9, 2009 at 1:10 AM, rb <[email protected]> wrote:

>
> Can't you just do something like this?:
>
> if($this->Model->query("<your query here>")){
>   //success
> } else {
>  //failed
> }
>
>
>
> On Jul 8, 12:56 pm, DigitalDude <[email protected]> wrote:
> > Hey,
> >
> > I'm doing a manual update to my database with a custom query, like so:
> >
> > $this->Model->query("UPDATE table SET attribute='1' WHERE condition='".
> > $variable);
> >
> > It's all good, it works fine. But how can I check if the result, in
> > this case the update, was successful?
> >
> > I need to check if it was successful, so I can redirect after it, and
> > post a message to the user.
> >
> > Does query return true or false after it has been executed?
> >
> > Would be nice if someone could help me with this!
> >
>


-- 
Thanks & Regards,
Vijayk.
Co-founder (www.weboniselab.com)

"You Bring the Dreams, We'll Bring the Means"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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