Today, I wrote my first code to saveAll() from form input and, knowing
I probably didn't do it right the first time, I wrapped my save
attempt in a try/catch block. Imagine my surprise when everything
returned success messages, but nothing actually got saved. A look at
the source indicated that
All you need to do is check that you got something back from the
saveAll, so you wrap it like:
if ($this-User-saveAll($this-data)){
-- success
}
else {
-- failure
}
Then you can look at the error data in the failure section ...
On Dec 17, 10:16 am, Rob Wilkerson
On Wed, Dec 17, 2008 at 1:48 PM, Rob webwe...@gmail.com wrote:
All you need to do is check that you got something back from the
saveAll, so you wrap it like:
if ($this-User-saveAll($this-data)){
-- success
}
else {
-- failure
}
Then you can look at the error data in the failure
On Wed, Dec 17, 2008 at 2:10 PM, Rob Wilkerson r...@robwilkerson.org wrote:
Would you mind expanding on that just a bit? How would I look at the
error data? In my case, I'd like to echo back an error message. What
structure do I look at to do so?
I may have spoken a little too soon. This