Re: tableInfo with MSSQL

From: Date: Tue, 06 Jan 2004 00:15:39 +0000
Subject: Re: tableInfo with MSSQL
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9973@lists.php.net to get a copy of this message
Thanks Markus. I must have been looking at some old documentation. Building with --with-mssql and not sybase makes it all work fine! <ASIDE>I now have a few php scripts that can browse, edit, add to (soon delete too) any database accessible via a pear dsn. I have tested on mysql, pgsql and mssql. It relies on the first field being the primary key, which is a limitation. Hopefully the crack PEAR team will include primary key indicators in the 'flags' returned by tableInfo soon! PEAR DB is great - I think LCD (lowest common denominator) is a fair price to pay for portability. </ASIDE> Thanks again for the help! Peter Markus Wolff wrote: > > Peter wrote: > > Hi, I am testing porting a web site to various DB's and am trying to get it going > > with MSSQL, just for a laugh :-). > > > > The call to $result->tableInfo() causes PHP to terminate with no message. When > > connecting to Postgres or MySQL servers the same code works fine. (I am using the latest downloads > > of FreeTds and PHP 4 (--with-sybase), compiled and installed on RedHat 2.2.5-22) > > Hi Peter, > > don't use the Sybase extension for this. Fetch a recent PHP version and > compile it with --with-mssql, or use ODBTP > (http://odbtp.sourceforge.net/) - a PEAR::DB driver for this great > extension is being worked on by ODBTP's author. > > You won't get tableInfo() to run with the Sybase extension - it simply > lacks the needed functions. > > CU > Markus -- Peter Becker Voice: +27-21-683 2083 http://mysite.mweb.co.za/residents/peterwb/

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