cvs: pear /DB/tests/driver mktable.inc
| From: | Daniel Convissor | Date: | Thu, 22 Jan 2004 08:04:53 +0000 |
| Subject: | cvs: pear /DB/tests/driver mktable.inc | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-15869@lists.php.net to get a copy of this message | ||
danielc Thu Jan 22 03:04:53 2004 EDT
Modified files:
/pear/DB/tests/driver mktable.inc
Log:
Tweak NULL in CREATE TABLE to make ibase and ifx happy.
http://cvs.php.net/diff.php/pear/DB/tests/driver/mktable.inc?r1=1.8&r2=1.9&ty=u
Index: pear/DB/tests/driver/mktable.inc
diff -u pear/DB/tests/driver/mktable.inc:1.8 pear/DB/tests/driver/mktable.inc:1.9
--- pear/DB/tests/driver/mktable.inc:1.8 Sat Jan 17 13:40:48 2004
+++ pear/DB/tests/driver/mktable.inc Thu Jan 22 03:04:53 2004
@@ -28,7 +28,7 @@
* </samp>
*
* @package DB
- * @version $Id: mktable.inc,v 1.8 2004/01/17 18:40:48 danielc Exp $
+ * @version $Id: mktable.inc,v 1.9 2004/01/22 08:04:53 danielc Exp $
* @category Database
* @internal
*/
@@ -44,12 +44,23 @@
//$dbh->setErrorHandling(PEAR_ERROR_TRIGGER);
$dbh->setErrorHandling(PEAR_ERROR_CALLBACK, 'debug_die');
+switch ($dbh->phptype) {
+ case 'ibase':
+ $null = '';
+ break;
+ case 'ifx':
+ $null = '';
+ break;
+ default:
+ $null = 'NULL';
+}
+
$test_mktable_query = "
CREATE TABLE phptest (
- a INTEGER NULL,
+ a INTEGER $null,
b CHAR(40) DEFAULT 'def' NOT NULL,
- c VARCHAR(255) NULL,
- d VARCHAR(20) NULL)
+ c VARCHAR(255) $null,
+ d VARCHAR(20) $null)
";
$dbh->query($test_mktable_query);