Re: DB/mssql.php

From: Date: Thu, 27 Sep 2001 20:31:08 +0000
Subject: Re: DB/mssql.php
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-2088@lists.php.net to get a copy of this message
I saw the thread in php-dev, but I thought it iterated the problem better than defining the solution. Until the extension folks find a way to unify these modules, can we have some work-arounds in the PEAR modules? I'm not sure how to tell if your using the sybase_ct/mssql-aliases or the native mssql functions, but if there is a way, it would keep us poor *nix users out of trouble for a while. BTW - the sybase.php driver also would appear to return the doubled-up array. Maybe I'll take a crack at hacking a *_ASSOC switch into the sybase_ct module - my C it pretty weak, but I think I rip a little guidance from the php_mssql.c stuff. That would make this patch a moot point, but wouldn't address the problem with missing fetch_field_*() functions for tableInfo(). On Thu, 2001-09-27 at 16:04, Markus Fischer wrote: > AFAIk there was a discussion a few weeks ago to clean up this > mess. > > - Markus > > On Thu, Sep 27, 2001 at 03:39:59PM -0400, Chris Jackson wrote : > > Had me for a minute there... > > I'm using sybase_ct module with FreeTDS for my mssql functions so Franks > > patches don't seem to apply - I'll keep this patch to myself, but I can > > see problems brewing here with keeping the DB/mssql.php module usable > > for those of us using FreeTDS/sybase_ct. I believe the latest CVS for > > DB/mssql.php is also broken for us when it comes to using the new > > tableInfo() stuff added by Tom Cox because > > mssql_fetch_[name,type,length] aren't implimented in the sybase_ct > > module either. > > I've been wishing on a star that the tds/sybase/sybase_ct/mssql/mssql > > aliases confusion will clear itself up, but I fear it's only going to > > get worse. I hope someone will step up to the plate and create a TDS php > > module so we can do away with the mssql aliases in sybase_ct (I'll even > > create a PEAR/DB module for it if that happen). > > > > > > On Thu, 2001-09-27 at 14:48, Markus Fischer wrote: > > > Whatch out: This is not true for the latest version (==RC && > > > CVS). Frank (Author of mssql) changed the behaviour about 3 > > > months ago. So recent PHP versions will only return keys and thus > > > your patch would break the result. > > > > > > - Markus > > > > > > On Thu, Sep 27, 2001 at 10:54:42AM -0400, Chris Jackson wrote : > > > > I've had to make a hack to my local DB/mssql.php in order to make the > > > > results of fetchInto() match those of mysql and others. Currently, mssql > > > > fetchInto() returns an array that includes number and field name keys. > > > > mssql.php, fbsql.php, and pgsql.php use their respective *_fetch_row()'s > > > > *_ASSOC switch to leave out the numbered keys. > > > > > > > > If this seems like the right thing to do, could someone with CVS access > > > > update DB/mssql.php ? > > > > > > > > Index: php4/pear/DB/mssql.php > > > > =================================================================== > > > > RCS file: /repository/php4/pear/DB/mssql.php,v > > > > retrieving revision 1.27 > > > > diff -r1.27 mssql.php > > > > 130a131,139 > > > > > if($ar){ > > > > > foreach($ar as $key=>$val) { > > > > > if($x%2){ > > > > > $tmp[$key] = $val; > > > > > } > > > > > $x++; > > > > > } > > > > > $ar = $tmp; > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Markus Fischer, http://guru.josefine.at/~mfischer/ > > > EMail: mfischer@guru.josefine.at > > > PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.ascî; > > > …=�:@ÖWàÍ5 > > > PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 > > > -All your scripts are belong to Zend- > > > > > > -- > Markus Fischer, http://guru.josefine.at/~mfischer/ > EMail: mfischer@guru.josefine.at > PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc > PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 > -All your scripts are belong to Zend- > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net > For additional commands, e-mail: pear-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

Attachment: [application/pgp-signature]
« previous php.pear.dev (#2088) next »