public static function f1($query, $opts = null, $connection_id = null) { if (class_exists("DEBUG")) { DEBUG::log_start("PDO FETCH"); } $o = self::getInstance(); if (!preg_match("/limit\\s*\\d+\\s*,\\s*\\d+/", $query)) { $query .= " limit 0,1"; } $res = $o->query($query, $opts, $connection_id); if (isset($res) && $res instanceof PDOStatement) { $rw = $res->fetch(); if (class_exists("DEBUG")) { DEBUG::log_end($query . (isset($opts) ? " with opts: " . join(",", $opts) : " without opts"), "PDO+FETCH ONE", "PDO FETCH"); } return $rw; } return null; }