Re: Memory usage with different Fetch modes
| From: | Markus Wolff | Date: | Tue, 03 Sep 2002 23:50:06 +0000 |
| Subject: | Re: Memory usage with different Fetch modes | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2236@lists.php.net to get a copy of this message | ||
On Tue, 3 Sep 2002 14:05:00 -0400
"Ron Dyck" <adam@webbtech.net> wrote:
> Which uses more memory, DB_FETCHMODE_ASSOC or DB_FETCHMODE_OBJECT.
I´d guess OBJECT will use more mem, but the differences should be
marginal, depending on the lenght of the column names.
> I understand that DB_FETCHMODE_ORDERED is the most efficient but find
> that akward. I've read that DB_FETCHMODE_OBJECT is better than
> DB_FETCHMODE_ASSOC. I that true?
Define better. It´s simply a different notation. From what I understand,
fetching something as DB_FETCHMODE_OBJECT equals something like this:
$row = (object) $result->fetchRow(DB_FETCHMODE_ASSOC);
Regards,
Markus
--
Markus Wolff <wolff@21st.de>