cvs: pear /MDB2/MDB2/Driver/Datatype mssql.php
| From: | Lorenzo Alberton | Date: | Fri, 02 Mar 2007 19:45:23 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Datatype mssql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44938@lists.php.net to get a copy of this message | ||
quipo Fri Mar 2 19:45:23 2007 UTC
Modified files:
/pear/MDB2/MDB2/Driver/Datatype mssql.php
Log:
avoid multiple "NULL" strings
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Datatype/mssql.php?r1=1.52&r2=1.53&diff_format=u
Index: pear/MDB2/MDB2/Driver/Datatype/mssql.php
diff -u pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.52 pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.53
--- pear/MDB2/MDB2/Driver/Datatype/mssql.php:1.52 Thu Mar 1 14:59:36 2007
+++ pear/MDB2/MDB2/Driver/Datatype/mssql.php Fri Mar 2 19:45:23 2007
@@ -44,7 +44,7 @@
// | Daniel Convissor <danielc@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: mssql.php,v 1.52 2007/03/01 14:59:36 quipo Exp $
+// $Id: mssql.php,v 1.53 2007/03/02 19:45:23 quipo Exp $
//
require_once 'MDB2/Driver/Datatype/Common.php';
@@ -219,6 +219,9 @@
}
$notnull = empty($field['notnull']) ? ' NULL' : ' NOT NULL';
+ if ($default == ' DEFAULT NULL' && $notnull == ' NULL') {
+ $notnull = '';
+ }
$collation = empty($field['collation']) ? '' :
' '.$this->_getCollationFieldDeclaration($field['collation']);
@@ -274,6 +277,9 @@
}
$notnull = empty($field['notnull']) ? ' NULL' : ' NOT NULL';
+ if ($default == ' DEFAULT NULL' && $notnull == ' NULL') {
+ $notnull = '';
+ }
if (!empty($field['unsigned'])) {
$db->warnings[] = "unsigned integer field \"$name\" is being declared
as signed integer";
}