Re: DB_FETCHMODE_ASSOC returns an ordered array using MsSQL
| From: | James 'Chip' Kaufman | Date: | Thu, 26 Feb 2004 23:10:00 +0000 |
| Subject: | Re: DB_FETCHMODE_ASSOC returns an ordered array using MsSQL | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10976@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 26 February 2004 17:10, Frederic Trudeau wrote:
> Worse. I get an empty result set, no errors
> I tried to debug via the output of the entire object, and I noticed
> that no matter what I do, the fetchmode property is aleays set to 1 :
>
> // snip
>
> > Well, subject is pretty much self explanatory ...
> >
> > $db = DB::connect('mssql://dbuser:dbpass@dbhost/dbname')
> > $sql = "SELECT * FROM sometable";
> > $res = $db->query($sql)
> > $row =& $res->fetchRow('DB_FETCHMODE_ASSOC');
How about:
$row = $res->fetchRow(DB_FETCHMODE_ASSOC);
- --
James 'Chip' Kaufman
jkaufman@wamnetgov.com
952-346-3532
PGP key: 697D43DE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFAPnzIrlGDUWl9Q94RAr28AKCIIM+KJsD419KUY3bOpEkQjslCpQCgqQT4
52C0WvW/+24GVJGzROoWmcA=
=dHgX
-----END PGP SIGNATURE-----