DB Exeptions and DataObject
| From: | kundert at mysunrise dot ch | Date: | Mon, 11 Oct 2004 14:45:56 +0000 |
| Subject: | DB Exeptions and DataObject | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-14843@lists.php.net to get a copy of this message | ||
Hi
I'v got a big understanding problem with DataObject and Database Exceptions (e.g.
Unique Key violation, wrong atribute name and so on). If an exception raise after
calling ->find() because of an invalid SQL, no error will occoure, even in debug
mode not!
The method find() execute the folling statement:
$this-_query('SELECT ' .
$this-_query['data_select'] .
' FROM ' . ($quoteIdentifiers ? $DB-quoteIdentifier($this-__table) :
$this-__table) . " " . $this-_join .
$this-_query['condition'] . ' '.
$this-_query['group_by'] . ' '.
$this-_query['having'] . ' '.
$this-_query['order_by'] . ' '.
In case of an error, _query() returns an Pear Error object, but it goes to nowhere.
No error occoure, it looks like the query doesn't return a row, because there is no
data. How can I find out, if there was an SELECT error or the query returns no
error?
_____________________________________________________________
Neu! sunrise SMS-Abos mit bis zu 250 SMS monatlich inklusive.
http://www.sunrise.ch/message