inc/database.inc.php
changeset 67 2f8c29fc5e2e
parent 55 a885f557678f
child 71 e1b918eaf69a
equal deleted inserted replaced
66:9e9876afefcc 67:2f8c29fc5e2e
    35 
    35 
    36 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dbError');
    36 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'dbError');
    37 
    37 
    38 $dsn = "$dbdsntype://$dbuser:$dbpass@$dbhost/$dbdatabase";
    38 $dsn = "$dbdsntype://$dbuser:$dbpass@$dbhost/$dbdatabase";
    39 $db = MDB2::connect($dsn);
    39 $db = MDB2::connect($dsn);
       
    40 $db->setOption('portability', MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL);
    40 
    41 
    41 if (MDB2::isError($db))
    42 if (MDB2::isError($db))
    42 {
    43 {
    43 	// Error handling should be put.
    44 	// Error handling should be put.
    44         error(MYSQL_ERROR_FATAL, $db->getMessage());
    45         error(MYSQL_ERROR_FATAL, $db->getMessage());