function da_sql_pconnect($config) { $retrytime = 0; if ($config[sql_use_http_credentials] == 'yes') { global $HTTP_SERVER_VARS; $SQL_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"]; $SQL_passwd = $HTTP_SERVER_VARS["PHP_AUTH_PW"]; } else { $SQL_user = $config[sql_username]; $SQL_passwd = $config[sql_password]; } if ($config[sql_connect_timeout] != 0) { $retrytime = $config[sql_connect_timeout]; } if ($config[sql_debug] == 'true') { print "<b>DEBUG(SQL,SQLRELAY DRIVER): Connect: Host={$config['sql_server']},Port={$config['sql_port']},User={$SQL_user},Password={$SQL_passwd} </b><br>\n"; } $link[con] = sqlrcon_alloc($config[sql_server], $config[sql_port], '', $SQL_user, $SQL_passwd, $retrytime, 1); if ($link[con]) { sqlrcon_debugOn($link[con]); $link[cur] = sqlrcur_alloc($link[con]); if ($link[cur]) { sqlrcur_setResultSetBufferSize($link[cur], 4); sqlrcur_lowerCaseColumnNames($link[cur]); return $link; } else { return false; } } else { return false; } }
/** * @desc Set the debug on for developers * @since 2007/05/03 => Split debug and explain * @access public * @return void */ function setDebugOn($bExplain = false) { $this->db_debug = true; sqlrcon_debugOn($this->conn_id); //DEPRECATED // Split Debug and explain // if ( true === $bExplain ) { // // $this->setDebugExplainOn(); // } //DEPRECATED }