Re: DataObject tweak ok with DB and MDB2
| From: | Dan Rossi | Date: | Thu, 07 Apr 2005 03:51:26 +0000 |
| Subject: | Re: DataObject tweak ok with DB and MDB2 | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-18585@lists.php.net to get a copy of this message | ||
On 07/04/2005, at 1:54 PM, Alan Knowles wrote:
Eak, finally get a chance to look through a patch ;)Welcome :)
- setLimit() on the DB object worries me as it may affect later queries being sent to the DB.. (or at least I would define that as unpredictable behaviour..) - should MDB sort out it's emulation of this?Ok currently there is a bug, it aint working ! So its not even appending a limit, but the limit data is being sent to setLimit, well its actually generating the limit sql but then somehow is dissapears again back in the query function. I wouldnt worry about it, i assume it gets cleared once a query has been sent :) MDB does have a pear db wrapper, but whats the point of that ? It also was missing a few things so scrapped that idea.
- are DB_FETCHMODE_ASSOC and MDB2_FETCHMODE_ASSOC really different?the constants are all renamed, if you send a DB_FETCHMODE_ASSOC to a MDB fetchRow it wont recognise it :)
- MDB2 should really implement smartQuote to emulate DB, it's a pretty simple function.MDB2's quote is doing casting then adding quotes so it looks like.
- layout around connect needs tidying up a bit:
$args = array($dsn);
if ($db_options) {
$args[] = $db_options;
}
$DB_....connections..... =
call_user_func_array(
array(....,connect)
$args);;
I'll give this a shot, but why was $db_options returning NULL originally then ?