Re: DB_FETCHMODE_ASSOC returns an ordered array using MsSQL [line 198 of mssql.php]
| From: | Frederic Trudeau | Date: | Thu, 26 Feb 2004 23:56:11 +0000 |
| Subject: | Re: DB_FETCHMODE_ASSOC returns an ordered array using MsSQL [line 198 of mssql.php] | ||
| References: | 1 2 3 4 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10979@lists.php.net to get a copy of this message | ||
DB v 1.6.0
PHP 4.3.4RC2 (cli, --with-sybase-ct=/usr/local/freetds)
freetype-devel-2.0.9-2
freetype-2.0.9-2
mssql 2000 (i think)
no this is weird ... little update.
i tried going to the source, and here is what i found
by removing the @ in front of the the mssql_fetch_array function in
mssql.php on line 198, i got this result :
PHP Warning: Wrong parameter count for mssql_fetch_array() in
/usr/share/pear/DB/mssql.php on line 200
$arr = mssql_fetch_array($result, MSSQL_ASSOC);
i do see to arguments here. when i remove the fetchmode, it goes on
peacefully, but of course, this is not what I want.
---------------------------------------------------
Frederic Trudeau
PHP Coder, Colocation, Development
ftrudeau@cam.org
514.529.3000 ext. 246
----- Original Message -----
From: "Frederic Trudeau" <ftrudeau@zesolution.com>
To: <pear-general@lists.php.net>
Sent: Thursday, February 26, 2004 6:17 PM
Subject: Re: [PEAR] DB_FETCHMODE_ASSOC returns an ordered array using MsSQL
> Arg. Still empty
>
> ----- Original Message -----
> From: "James 'Chip' Kaufman" <jkaufman@wamnetgov.com>
> To: <pear-general@lists.php.net>
> Sent: Thursday, February 26, 2004 6:10 PM
> Subject: Re: [PEAR] DB_FETCHMODE_ASSOC returns an ordered array using
MsSQL
>
>
> -----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-----
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>