Re: DB_FETCHMODE_ASSOC returns an ordered array using MsSQL [FIXED]

From: Date: Fri, 27 Feb 2004 00:53:45 +0000
Subject: Re: DB_FETCHMODE_ASSOC returns an ordered array using MsSQL [FIXED]
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-10984@lists.php.net to get a copy of this message
rebuild with php-4.3.5RC3 with option --with-mssql=/usr/local/freetds instead of --with-sybase-ct=/usr/local/freetds works great now ----- Original Message ----- From: "Frederic Trudeau" <ftrudeau@zesolution.com> To: <pear-general@lists.php.net> Sent: Thursday, February 26, 2004 7:10 PM Subject: Re: [PEAR] DB_FETCHMODE_ASSOC returns an ordered array using MsSQ > > Thanks Justin, already tried all I could try. See my last post on the > subject. > I suspect a possible bug with sybase/freetds > Really dont know, im trying to build with latest version of PHP now, playing > around with configure options. > > ----- Original Message ----- > From: "Justin Patrin" <papercrane@reversefold.com> > To: <pear-general@lists.php.net> > Sent: Thursday, February 26, 2004 7:04 PM > Subject: Re: [PEAR] DB_FETCHMODE_ASSOC returns an ordered array using MsSQ > > > > David Dimaria wrote: > > > > > Try taking the off the single quotes: DB_FETCHMODE_ASSOC instead of > > > 'DB_FETCHMODE_ASSOC' > > > > > > -David > > > > > > -----Original Message----- > > > From: Frederic Trudeau [mailto:ftrudeau@zesolution.com] > > > Sent: Thursday, February 26, 2004 4:00 PM > > > To: pear-general@lists.php.net > > > Subject: [PEAR] DB_FETCHMODE_ASSOC returns an ordered array using MsSQL > > > > > > > > > > > > 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'); > > > print_r($row); > > > > > > output is : > > > > > > Array > > > ( > > > [0] => 75 > > > [1] => WOP_SSL > > > [2] => 0 > > > [3] => {{wop_ssl}} > > > [4] => > > > [5] => N > > > [6] => > > > [7] => 0 > > > [8] => > > > [9] => > > > [10] => G > > > [11] => NETWORK > > > [12] => G > > > [13] => NETWORK > > > [14] => G > > > [15] => NETWORK > > > [16] => > > > [17] => > > > ) > > > > > > help ? : ) > > > > > > > You could try this just after you connect: > > $db->setFetchMode(DB_FETCHMODE_ASSOC); > > > > -- > > paperCrane <Justin Patrin> > > > > -- > > 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 > >

« previous php.pear.general (#10984) next »