cvs: pear /MDB2/MDB2/Driver/Manager mssql.php

From: Date: Fri, 10 Jun 2005 13:34:21 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Manager mssql.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-32454@lists.php.net to get a copy of this message
alexmerz Fri Jun 10 09:34:21 2005 EDT Modified files: /pear/MDB2/MDB2/Driver/Manager mssql.php Log: there seems to be a problem with ON DEFAULT and fixed the problem, that an existing var could be have no value http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Manager/mssql.php?r1=1.23&r2=1.24&ty=u Index: pear/MDB2/MDB2/Driver/Manager/mssql.php diff -u pear/MDB2/MDB2/Driver/Manager/mssql.php:1.23 pear/MDB2/MDB2/Driver/Manager/mssql.php:1.24 --- pear/MDB2/MDB2/Driver/Manager/mssql.php:1.23 Sat Apr 16 18:27:48 2005 +++ pear/MDB2/MDB2/Driver/Manager/mssql.php Fri Jun 10 09:34:20 2005 @@ -42,7 +42,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.23 2005/04/16 22:27:48 lsmith Exp $ +// $Id: mssql.php,v 1.24 2005/06/10 13:34:20 alexmerz Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -69,9 +69,14 @@ function createDatabase($name) { $db =& $GLOBALS['_MDB2_databases'][$this->db_index]; - $database_device = (isset($db->options['database_device'])) ? $db->options['database_device'] : 'DEFAULT'; - $database_size = (isset($db->options['database_size'])) ? '='.$db->options['database_size'] : ''; - return $db->standaloneQuery("CREATE DATABASE $name ON $database_device$database_size"); +// var_dump($db->options);die; + $database_device = (isset($db->options['database_device']) && $db->options['database_device']) ? $db->options['database_device'] : ''; + $database_size = (isset($db->options['database_size']) && $db->options['database_size']) ? '='.$db->options['database_size'] : ''; + $onclause = ''; + if( '' != $database_device || '' != $database_device ) { + $onclause = ' ON $database_device$database_size'; + } + return $db->standaloneQuery("CREATE DATABASE $name $onclause"); } // }}} @@ -382,4 +387,4 @@ } return $sequences; }} -?> \ No newline at end of file +?>

« previous php.pear.cvs (#32454) next »