$this->db_connect_id = ($this->persistency) ? @ibase_pconnect($use_database, $this->user, $sqlpassword, false, false, 3) : @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3);
| if ($this->persistency) { if (!function_exists('ibase_pconnect')) { $this->connect_error = 'ibase_pconnect function does not exist, is interbase extension installed?'; return $this->sql_error(''); } $this->db_connect_id = @ibase_pconnect($use_database, $this->user, $sqlpassword, false, false, 3); } else { if (!function_exists('ibase_connect')) { $this->connect_error = 'ibase_connect function does not exist, is interbase extension installed?'; return $this->sql_error(''); } $this->db_connect_id = @ibase_connect($use_database, $this->user, $sqlpassword, false, false, 3); }
|
$this->service_handle = (function_exists('ibase_service_attach') && $this->server) ? @ibase_service_attach($this->server, $this->user, $sqlpassword) : false;
| // Do not call ibase_service_attach if connection failed, // otherwise error message from ibase_(p)connect call will be clobbered. if ($this->db_connect_id && function_exists('ibase_service_attach') && $this->server) { $this->service_handle = @ibase_service_attach($this->server, $this->user, $sqlpassword); } else { $this->service_handle = false; }
|
}
/** * Seek to given row number * rownum is zero-based */ function sql_rowseek($rownum, &$query_id) { global $cache;
if ($query_id === false) { $query_id = $this->query_result; }
if (isset($cache->sql_rowset[$query_id])) { return $cache->sql_rowseek($rownum, $query_id); }
if ($query_id === false) { return; }
$this->sql_freeresult($query_id); $query_id = $this->sql_query($this->last_query_text);
if ($query_id === false) { return false; }
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row for ($i = 0; $i < $rownum; $i++) { if (!$this->sql_fetchrow($query_id)) { return false; } }
return true;
| |