cvs: pear /DB/DB mssql.php
| From: | Daniel Convissor | Date: | Fri, 10 Jun 2005 13:29:41 +0000 |
| Subject: | cvs: pear /DB/DB mssql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-32457@lists.php.net to get a copy of this message | ||
danielc Fri Jun 10 09:29:41 2005 EDT
Modified files:
/pear/DB/DB mssql.php
Log:
* Use mssql_fetch_assoc() instead of mssql_fetch_array().
Should resolve FreeTDS and/or Sybase issues discussed in bug 1525, et al.
http://cvs.php.net/diff.php/pear/DB/DB/mssql.php?r1=1.84&r2=1.85&ty=u
Index: pear/DB/DB/mssql.php
diff -u pear/DB/DB/mssql.php:1.84 pear/DB/DB/mssql.php:1.85
--- pear/DB/DB/mssql.php:1.84 Fri Jun 10 09:04:14 2005
+++ pear/DB/DB/mssql.php Fri Jun 10 09:29:40 2005
@@ -20,7 +20,7 @@
* @author Daniel Convissor <danielc@php.net>
* @copyright 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: mssql.php,v 1.84 2005/06/10 13:04:14 danielc Exp $
+ * @version CVS: $Id: mssql.php,v 1.85 2005/06/10 13:29:40 danielc Exp $
* @link http://pear.php.net/package/DB
*/
@@ -324,15 +324,7 @@
}
}
if ($fetchmode & DB_FETCHMODE_ASSOC) {
- /*
- * The mssql_fetch_array() only works correctly if you have
- * compiled PHP using --with-mssql=[dir_to_FreeTDS].
- *
- * Also, DB's mssql driver is only for Microsfoft SQL Server
- * databases. If you're connecting to a Sybase database, you
- * MUST specify "sybase" as the "phptype" in the DSN.
- */
- $arr = @mssql_fetch_array($result, MSSQL_ASSOC);
+ $arr = @mssql_fetch_assoc($result);
if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE
&& $arr) {
$arr = array_change_key_case($arr, CASE_LOWER);
}