Re: DB stuff

From: Date: Mon, 26 Mar 2001 14:44:46 +0000
Subject: Re: DB stuff
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-98@lists.php.net to get a copy of this message
> The fetchmode has to be hardcoded to DB_FETCHMODE_ASSOC here, or your > object won't contain much. Also, if fetchInto() returns an object, an > error should be raised. :-) I understand your first comment ... yeah, I meant to say that. :) I don't understand the last point though. If fetchInto() *does* return an object, are we using that as the indication there was an error? Instead of: if (is_object($res)) { Why not: if ($res !== DB_OK) { (Although there is a condition where the fetchInto will fail, and return NULL instead of an error ... don't know how we want to catch that) > If "->" somehow pleases you more than "[]", fine. I still don't > see > the point in having objects without methods instead of assocs. :-) Yeah, well ... it's mostly a back-porting thing. I agree that there is no advantage, except it makes code look a bit cooler sometimes. ;) - Colin

« previous php.pear.dev (#98) next »