mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
Notices: Add helper for reset() with expression
This commit is contained in:
@@ -876,7 +876,7 @@ AND typelem = 0"
|
||||
// sequences for fields
|
||||
if (preg_match('~nextval\(\'([^\']+)\'\)~', $field['default'], $matches)) {
|
||||
$sequence_name = $matches[1];
|
||||
$sq = reset(get_rows((min_version(10)
|
||||
$sq = first(get_rows((min_version(10)
|
||||
? "SELECT *, cache_size AS cache_value FROM pg_sequences WHERE schemaname = current_schema() AND sequencename = " . q(idf_unescape($sequence_name))
|
||||
: "SELECT * FROM $sequence_name"
|
||||
), null, "-- "));
|
||||
|
@@ -34,7 +34,7 @@ if (isset($_GET["sqlite"])) {
|
||||
function quote($string) {
|
||||
return (is_utf8($string)
|
||||
? "'" . $this->link->escapeString($string) . "'"
|
||||
: "x'" . reset(unpack('H*', $string)) . "'"
|
||||
: "x'" . first(unpack('H*', $string)) . "'"
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user