[PHP-DB] [DB_DataObject] why is there no query($query, $params) method?

2005-05-09 Thread Thomas
Hi
DB_DataObject uses PEAR::DB internally, which provides a nice query 
method with two arguments: the SQL statement (with placeholders) and a 
parameter array, so that I don't have to do any escaping etc.

Is there any reason that this method signature is not supported by 
DB_DataObject? There is a query method, of course, but it takes only one 
SQL string argument..

Cheers,
 Thomas
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] [DB_DataObject] why is there no query($query, $params) method?

2005-05-09 Thread Kieran.Tully AT acm.org
On 09/05/05, Thomas [EMAIL PROTECTED] wrote:

 Is there any reason that this method signature is not supported by
 DB_DataObject?

Perhaps because it doesn't make sense to wrap every DB
method when you can already do

$dataObject-getDatabaseConnection()-query(...)

--
Kieran Tully, Software Developer and Tenor
Reply to Kieran.Tully AT acm.org
http://kieran.tul.ly  http://www.cs.tcd.ie/~tullyka


-- 
Kieran Tully, Software Developer and Tenor
Reply to Kieran.Tully AT acm.org
http://kieran.tul.ly  http://www.cs.tcd.ie/~tullyka

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] [DB_DataObject] why is there no query($query, $params) method?

2005-05-09 Thread Thomas
Sorry, but doesn't make sense to me, since there is nothing parsing the 
result then.

If you have a look at the _query() method, it does the essential parsing 
of the sql result, raising errors etc.

I don't want to bypass the DataObject framework at this point.
T
Kieran.Tully AT acm.org wrote:
On 09/05/05, Thomas [EMAIL PROTECTED] wrote:

Is there any reason that this method signature is not supported by
DB_DataObject?

Perhaps because it doesn't make sense to wrap every DB
method when you can already do
$dataObject-getDatabaseConnection()-query(...)
--
Kieran Tully, Software Developer and Tenor
Reply to Kieran.Tully AT acm.org
http://kieran.tul.ly  http://www.cs.tcd.ie/~tullyka

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php