I see...however, I do feel find('first'..) should behave like
find('all') where it returns false on error and empty array on empty
result...On Dec 6, 8:00 pm, euromark <[email protected]> wrote: > usually there shouldnt be any errors :) > > but you could put this in your app_model.php: > > /** > * @return string Error message with error number > */ > public function lastError() { > $db = $this->getDataSource(); > return $db->lastError(); > } > > if its not empty there was an error > > On 7 Dez., 02:10, "[email protected]" <[email protected]> wrote: > > > Hi all, > > > It appears Model->find('first', ...) returns false in both cases: > > > 1) SQL error > > 2) Empty result > > > How am I supposed to know which is which if it behaves this way? > > > Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
