cvs: pear /MDB2/MDB2/Driver/Datatype mssql.php pgsql.php
| From: | Lukas Smith | Date: | Fri, 27 Oct 2006 09:39:52 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Datatype mssql.php pgsql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42829@lists.php.net to get a copy of this message | ||
lsmith Fri Oct 27 09:39:52 2006 UTC
Modified files:
/pear/MDB2/MDB2/Driver/Datatype mssql.php pgsql.php
Log:
- pgsql handles the various integer types, so we should not strip the integer size information
- added this as a todo for mssql
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Datatype/mssql.php?r1=1.47&r2=1.48&diff_format=u
Index: pear/MDB2/MDB2/Driver/Datatype/mssql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.47 pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.48
--- pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.47 Sat Oct 14 13:42:01 2006
+++ pear/MDB2/MDB2/Driver/Datatype/mssql.php Fri Oct 27 09:39:52 2006
@@ -44,7 +44,7 @@
// | Daniel Convissor <danielc@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: mssql.php,v 1.47 2006/10/14 13:42:01 lsmith Exp $
+// $Id: mssql.php,v 1.48 2006/10/27 09:39:52 lsmith Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -384,7 +384,8 @@
*/
function mapNativeDatatype($field)
{
- $db_type = preg_replace('/\d/','', strtolower($field['type'])
);
+ // todo: handle length of various int variations
+ $db_type = preg_replace('/\d/','',
strtolower($field['type']));
$length = $field['length'];
if ((int)$length <= 0) {
$length = null;
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Datatype/pgsql.php?r1=1.78&r2=1.79&diff_format=u
Index: pear/MDB2/MDB2/Driver/Datatype/pgsql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.78 pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.79
--- pear/MDB2/MDB2/Driver/Datatype/pgsql.php:1.78 Sat Oct 14 16:41:07 2006
+++ pear/MDB2/MDB2/Driver/Datatype/pgsql.php Fri Oct 27 09:39:52 2006
@@ -42,7 +42,7 @@
// | Author: Paul Cooper <pgc@ucecom.com> |
// +----------------------------------------------------------------------+
//
-// $Id: pgsql.php,v 1.78 2006/10/14 16:41:07 lsmith Exp $
+// $Id: pgsql.php,v 1.79 2006/10/27 09:39:52 lsmith Exp $
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -393,7 +393,7 @@
*/
function mapNativeDatatype($field)
{
- $db_type = preg_replace('/\d/','', strtolower($field['type'])
);
+ $db_type = strtolower($field['type']);
$length = $field['length'];
if ($length == '-1' && !empty($field['atttypmod'])) {
$length = $field['atttypmod'] - 4;