includes/dbal.php
changeset 483 2cb1c8a6d3db
parent 475 51386f1852b8
child 503 f205f4b201ed
equal deleted inserted replaced
482:647d11c5e9c1 483:2cb1c8a6d3db
   129   
   129   
   130   function connect($manual_credentials = false, $dbhost = false, $dbuser = false, $dbpasswd = false, $dbname = false)
   130   function connect($manual_credentials = false, $dbhost = false, $dbuser = false, $dbpasswd = false, $dbname = false)
   131   {
   131   {
   132     $this->enable_errorhandler();
   132     $this->enable_errorhandler();
   133     
   133     
   134     define('ENANO_DBLAYER', 'MYSQL');
   134     if ( !defined('ENANO_SQL_CONSTANTS') )
   135     define('ENANO_SQLFUNC_LOWERCASE', 'lcase');
   135     {
   136     define('ENANO_SQL_MULTISTRING_PRFIX', '');
   136       define('ENANO_SQL_CONSTANTS', '');
   137     define('ENANO_SQL_BOOLEAN_TRUE', 'true');
   137       define('ENANO_DBLAYER', 'MYSQL');
   138     define('ENANO_SQL_BOOLEAN_FALSE', 'false');
   138       define('ENANO_SQLFUNC_LOWERCASE', 'lcase');
       
   139       define('ENANO_SQL_MULTISTRING_PRFIX', '');
       
   140       define('ENANO_SQL_BOOLEAN_TRUE', 'true');
       
   141       define('ENANO_SQL_BOOLEAN_FALSE', 'false');
       
   142     }
   139     
   143     
   140     if ( !$manual_credentials )
   144     if ( !$manual_credentials )
   141     {
   145     {
   142       if ( defined('IN_ENANO_INSTALL') && !defined('IN_ENANO_UPGRADE') )
   146       if ( defined('IN_ENANO_INSTALL') && !defined('IN_ENANO_UPGRADE') )
   143       {
   147       {
   905   
   909   
   906   function connect($manual_credentials = false, $dbhost = false, $dbuser = false, $dbpasswd = false, $dbname = false)
   910   function connect($manual_credentials = false, $dbhost = false, $dbuser = false, $dbpasswd = false, $dbname = false)
   907   {
   911   {
   908     $this->enable_errorhandler();
   912     $this->enable_errorhandler();
   909     
   913     
   910     define('ENANO_DBLAYER', 'PGSQL');
   914     if ( !defined('ENANO_SQL_CONSTANTS') )
   911     define('ENANO_SQLFUNC_LOWERCASE', 'lower');
   915     {
   912     define('ENANO_SQL_MULTISTRING_PRFIX', 'E');
   916       define('ENANO_SQL_CONSTANTS', '');
   913     define('ENANO_SQL_BOOLEAN_TRUE', '1');
   917       define('ENANO_DBLAYER', 'PGSQL');
   914     define('ENANO_SQL_BOOLEAN_FALSE', '0');
   918       define('ENANO_SQLFUNC_LOWERCASE', 'lower');
       
   919       define('ENANO_SQL_MULTISTRING_PRFIX', 'E');
       
   920       define('ENANO_SQL_BOOLEAN_TRUE', '1');
       
   921       define('ENANO_SQL_BOOLEAN_FALSE', '0');
       
   922     }
   915     
   923     
   916     if ( !$manual_credentials )
   924     if ( !$manual_credentials )
   917     {
   925     {
   918       if ( defined('IN_ENANO_INSTALL') && !defined('IN_ENANO_UPGRADE') )
   926       if ( defined('IN_ENANO_INSTALL') && !defined('IN_ENANO_UPGRADE') )
   919       {
   927       {