return ($unicode ? "N" : "") . "'" . str_replace("'", "''", $string) . "'";
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return $this->query(use_sql($database));
}
} else {
abstract class MssqlDb extends PdoDb {
- function select_db(string $database): bool {
+ function select_db(string $database) {
// database selection is separated from the connection so dbname in DSN can't be used
return $this->query(use_sql($database));
}
return "'" . mysql_real_escape_string($string, $this->link) . "'";
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return mysql_select_db($database, $this->link);
}
return $this->query("SET NAMES $charset"); // charset in DSN is ignored before PHP 5.3.6
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
// database selection is separated from the connection so dbname in DSN can't be used
return $this->query("USE " . idf_escape($database));
}
return "'" . str_replace("'", "''", $string) . "'";
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
$this->_current_db = $database;
return true;
}
return $this->dsn("oci:dbname=//$server;charset=AL32UTF8", $username, $password);
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
$this->_current_db = $database;
return true;
}
return ($field["type"] == "bytea" && $val !== null ? pg_unescape_bytea($val) : $val);
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
if ($database == adminer()->database()) {
return $this->database;
}
return $this->dsn($dsn, $username, $password);
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return (adminer()->database() == $database);
}
*/
abstract function quote(string $string): string;
- /** Select database */
- abstract function select_db(string $database): bool;
+ /** Select database
+ * @return bool boolish
+ */
+ abstract function select_db(string $database);
/** Send query
* @return Result|bool
return ($return ? '' : $this->error);
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
$this->_db = $database;
return true;
}
return ($return ? '' : $this->error);
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return true;
}
return "'" . str_replace("'", "''", $string) . "'";
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return ($database == "domain");
}
return ($this->imap ? '' : imap_last_error());
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return ($database == "mail");
}
return false;
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
$this->_db_name = $database;
return true;
}
return '';
}
- function select_db(string $database): bool {
+ function select_db(string $database) {
return ($database == "domain");
}