Re: getting field names for key in getOne()
| From: | Justin Patrin | Date: | Fri, 04 Jun 2004 15:07:08 +0000 |
| Subject: | Re: getting field names for key in getOne() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12908@lists.php.net to get a copy of this message | ||
Clint Skidmore wrote:
is there any way to get the field name as the key when using the getOne() method. I cannot figure it outNo. They field is the first one you're selecting in your statement. getOne() is meant to return only one value from the first record selected. If you want the full record with keys, use: $db->getRow($sql, DB_FETCHMODE_ASSOC); -- paperCrane <Justin Patrin>