亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pgsql.php

?? PhpWiki是sourceforge的一個開源項目
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
    /**     * Get the number of rows in a result set.     *     * @param $result resource PostgreSQL result identifier     *     * @return int the number of rows in $result     */    function numRows($result)    {        $rows = @pg_numrows($result);        if ($rows === null) {            return $this->pgsqlRaiseError();        }        return $rows;    }    // }}}    // {{{ errorNative()    /**     * Get the native error code of the last error (if any) that     * occured on the current connection.     *     * @return int native PostgreSQL error code     */    function errorNative()    {        return pg_errormessage($this->connection);    }    // }}}    // {{{ autoCommit()    /**     * Enable/disable automatic commits     */    function autoCommit($onoff = false)    {        // XXX if $this->transaction_opcount > 0, we should probably        // issue a warning here.        $this->autocommit = $onoff ? true : false;        return DB_OK;    }    // }}}    // {{{ commit()    /**     * Commit the current transaction.     */    function commit()    {        if ($this->transaction_opcount > 0) {            // (disabled) hack to shut up error messages from libpq.a            //@fclose(@fopen("php://stderr", "w"));            $result = @pg_exec($this->connection, 'end;');            $this->transaction_opcount = 0;            if (!$result) {                return $this->pgsqlRaiseError();            }        }        return DB_OK;    }    // }}}    // {{{ rollback()    /**     * Roll back (undo) the current transaction.     */    function rollback()    {        if ($this->transaction_opcount > 0) {            $result = @pg_exec($this->connection, 'abort;');            $this->transaction_opcount = 0;            if (!$result) {                return $this->pgsqlRaiseError();            }        }        return DB_OK;    }    // }}}    // {{{ affectedRows()    /**     * Gets the number of rows affected by the last query.     * if the last query was a select, returns 0.     *     * @return int number of rows affected by the last query or DB_ERROR     */    function affectedRows()    {        return $this->affected;    }    // }}}    // {{{ nextId()    /**     * Returns the next free id in a sequence     *     * @param string  $seq_name  name of the sequence     * @param boolean $ondemand  when true, the seqence is automatically     *                           created if it does not exist     *     * @return int  the next id number in the sequence.  DB_Error if problem.     *     * @internal     * @see DB_common::nextID()     * @access public     */    function nextId($seq_name, $ondemand = true)    {        $seqname = $this->getSequenceName($seq_name);        $repeat = false;        do {            $this->pushErrorHandling(PEAR_ERROR_RETURN);            $result =& $this->query("SELECT NEXTVAL('${seqname}')");            $this->popErrorHandling();            if ($ondemand && DB::isError($result) &&                $result->getCode() == DB_ERROR_NOSUCHTABLE) {                $repeat = true;                $this->pushErrorHandling(PEAR_ERROR_RETURN);                $result = $this->createSequence($seq_name);                $this->popErrorHandling();                if (DB::isError($result)) {                    return $this->raiseError($result);                }            } else {                $repeat = false;            }        } while ($repeat);        if (DB::isError($result)) {            return $this->raiseError($result);        }        $arr = $result->fetchRow(DB_FETCHMODE_ORDERED);        $result->free();        return $arr[0];    }    // }}}    // {{{ createSequence()    /**     * Create the sequence     *     * @param string $seq_name the name of the sequence     * @return mixed DB_OK on success or DB error on error     * @access public     */    function createSequence($seq_name)    {        $seqname = $this->getSequenceName($seq_name);        $result = $this->query("CREATE SEQUENCE ${seqname}");        return $result;    }    // }}}    // {{{ dropSequence()    /**     * Drop a sequence     *     * @param string $seq_name the name of the sequence     * @return mixed DB_OK on success or DB error on error     * @access public     */    function dropSequence($seq_name)    {        $seqname = $this->getSequenceName($seq_name);        return $this->query("DROP SEQUENCE ${seqname}");    }    // }}}    // {{{ modifyLimitQuery()    function modifyLimitQuery($query, $from, $count)    {        $query = $query . " LIMIT $count OFFSET $from";        return $query;    }    // }}}    // {{{ pgsqlRaiseError()    /**     * Gather information about an error, then use that info to create a     * DB error object and finally return that object.     *     * @param  integer  $errno  PEAR error number (usually a DB constant) if     *                          manually raising an error     * @return object  DB error object     * @see errorNative()     * @see errorCode()     * @see DB_common::raiseError()     */    function pgsqlRaiseError($errno = null)    {        $native = $this->errorNative();        if ($errno === null) {            $err = $this->errorCode($native);        } else {            $err = $errno;        }        return $this->raiseError($err, null, null, null, $native);    }    // }}}    // {{{ _pgFieldFlags()    /**     * Flags of a Field     *     * @param int $resource PostgreSQL result identifier     * @param int $num_field the field number     *     * @return string The flags of the field ("not_null", "default_value",     *                "primary_key", "unique_key" and "multiple_key"     *                are supported).  The default value is passed     *                through rawurlencode() in case there are spaces in it.     * @access private     */    function _pgFieldFlags($resource, $num_field, $table_name)    {        $field_name = @pg_fieldname($resource, $num_field);        $result = @pg_exec($this->connection, "SELECT f.attnotnull, f.atthasdef                                FROM pg_attribute f, pg_class tab, pg_type typ                                WHERE tab.relname = typ.typname                                AND typ.typrelid = f.attrelid                                AND f.attname = '$field_name'                                AND tab.relname = '$table_name'");        if (@pg_numrows($result) > 0) {            $row = @pg_fetch_row($result, 0);            $flags  = ($row[0] == 't') ? 'not_null ' : '';            if ($row[1] == 't') {                $result = @pg_exec($this->connection, "SELECT a.adsrc                                    FROM pg_attribute f, pg_class tab, pg_type typ, pg_attrdef a                                    WHERE tab.relname = typ.typname AND typ.typrelid = f.attrelid                                    AND f.attrelid = a.adrelid AND f.attname = '$field_name'                                    AND tab.relname = '$table_name' AND f.attnum = a.adnum");                $row = @pg_fetch_row($result, 0);                $num = preg_replace("/'(.*)'::\w+/", "\\1", $row[0]);                $flags .= 'default_' . rawurlencode($num) . ' ';            }        } else {            $flags = '';        }        $result = @pg_exec($this->connection, "SELECT i.indisunique, i.indisprimary, i.indkey                                FROM pg_attribute f, pg_class tab, pg_type typ, pg_index i                                WHERE tab.relname = typ.typname                                AND typ.typrelid = f.attrelid                                AND f.attrelid = i.indrelid                                AND f.attname = '$field_name'                                AND tab.relname = '$table_name'");        $count = @pg_numrows($result);        for ($i = 0; $i < $count ; $i++) {            $row = @pg_fetch_row($result, $i);            $keys = explode(' ', $row[2]);            if (in_array($num_field + 1, $keys)) {                $flags .= ($row[0] == 't' && $row[1] == 'f') ? 'unique_key ' : '';                $flags .= ($row[1] == 't') ? 'primary_key ' : '';                if (count($keys) > 1)                    $flags .= 'multiple_key ';            }        }        return trim($flags);    }    // }}}    // {{{ tableInfo()    /**     * Returns information about a table or a result set.     *     * NOTE: only supports 'table' and 'flags' if <var>$result</var>     * is a table name.     *     * @param object|string  $result  DB_result object from a query or a     *                                string containing the name of a table     * @param int            $mode    a valid tableInfo mode     * @return array  an associative array with the information requested     *                or an error object if something is wrong     * @access public     * @internal     * @see DB_common::tableInfo()     */    function tableInfo($result, $mode = null)    {        if (isset($result->result)) {            /*             * Probably received a result object.             * Extract the result resource identifier.             */            $id = $result->result;            $got_string = false;        } elseif (is_string($result)) {            /*             * Probably received a table name.             * Create a result resource identifier.             */            $id = @pg_exec($this->connection, "SELECT * FROM $result LIMIT 0");            $got_string = true;        } else {            /*             * Probably received a result resource identifier.             * Copy it.             * Deprecated.  Here for compatibility only.             */            $id = $result;            $got_string = false;        }        if (!is_resource($id)) {            return $this->pgsqlRaiseError(DB_ERROR_NEED_MORE_DATA);        }        if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) {            $case_func = 'strtolower';        } else {            $case_func = 'strval';        }        $count = @pg_numfields($id);        // made this IF due to performance (one if is faster than $count if's)        if (!$mode) {            for ($i=0; $i<$count; $i++) {                $res[$i]['table'] = $got_string ? $case_func($result) : '';                $res[$i]['name']  = $case_func(@pg_fieldname($id, $i));                $res[$i]['type']  = @pg_fieldtype($id, $i);                $res[$i]['len']   = @pg_fieldsize($id, $i);                $res[$i]['flags'] = $got_string ? $this->_pgFieldflags($id, $i, $result) : '';            }        } else { // full            $res['num_fields']= $count;            for ($i=0; $i<$count; $i++) {                $res[$i]['table'] = $got_string ? $case_func($result) : '';                $res[$i]['name']  = $case_func(@pg_fieldname($id, $i));                $res[$i]['type']  = @pg_fieldtype($id, $i);                $res[$i]['len']   = @pg_fieldsize($id, $i);                $res[$i]['flags'] = $got_string ? $this->_pgFieldFlags($id, $i, $result) : '';                if ($mode & DB_TABLEINFO_ORDER) {                    $res['order'][$res[$i]['name']] = $i;                }                if ($mode & DB_TABLEINFO_ORDERTABLE) {                    $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i;                }            }        }        // free the result only if we were called on a table        if ($got_string) {            @pg_freeresult($id);        }        return $res;    }    // }}}    // {{{ getTablesQuery()    /**     * Returns the query needed to get some backend info     * @param string $type What kind of info you want to retrieve     * @return string The SQL query string     */    function getSpecialQuery($type)    {        switch ($type) {            case 'tables':                return "SELECT c.relname as \"Name\"                        FROM pg_class c, pg_user u                        WHERE c.relowner = u.usesysid AND c.relkind = 'r'                        AND not exists (select 1 from pg_views where viewname = c.relname)                        AND c.relname !~ '^pg_'                        UNION                        SELECT c.relname as \"Name\"                        FROM pg_class c                        WHERE c.relkind = 'r'                        AND not exists (select 1 from pg_views where viewname = c.relname)                        AND not exists (select 1 from pg_user where usesysid = c.relowner)                        AND c.relname !~ '^pg_'";            case 'views':                // Table cols: viewname | viewowner | definition                return 'SELECT viewname FROM pg_views';            case 'users':                // cols: usename |usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd  |valuntil                return 'SELECT usename FROM pg_user';            case 'databases':                return 'SELECT datname FROM pg_database';            case 'functions':                return 'SELECT proname FROM pg_proc';            default:                return null;        }    }    // }}}}/* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: */?>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费成人av在线| 午夜精品久久久久久久久久| 4438x成人网最大色成网站| 欧美综合欧美视频| 欧美性高清videossexo| 欧美在线色视频| 7777精品伊人久久久大香线蕉最新版| 欧美写真视频网站| 欧美高清激情brazzers| 欧美成人欧美edvon| 国产午夜一区二区三区| 欧美国产日韩一二三区| 综合亚洲深深色噜噜狠狠网站| 亚洲人妖av一区二区| 亚洲va在线va天堂| 久久爱www久久做| www.视频一区| 欧美视频第二页| 欧美大肚乱孕交hd孕妇| 国产精品乱码妇女bbbb| 一区二区免费在线| 免费在线成人网| 国产成人免费9x9x人网站视频| 国产成人精品一区二区三区四区| 99精品在线观看视频| 欧美日韩国产123区| 久久综合久色欧美综合狠狠| 国产精品国产三级国产普通话三级| 亚洲男女一区二区三区| 青青青伊人色综合久久| 成人福利视频在线看| 欧美日韩国产高清一区二区| 久久精品夜色噜噜亚洲aⅴ| 一区二区三区在线免费| 久久aⅴ国产欧美74aaa| 91久久一区二区| 精品国产伦一区二区三区免费 | 一区二区三区鲁丝不卡| 日本欧美韩国一区三区| av一区二区三区四区| 91麻豆精品国产91久久久| 国产精品乱人伦| 久久99最新地址| 欧美日韩免费一区二区三区 | 免费在线视频一区| 91在线porny国产在线看| 日韩欧美一区中文| 亚洲自拍偷拍av| 成人动漫一区二区在线| 欧美电影免费观看高清完整版在线观看| 国产精品女同一区二区三区| 日韩av一区二区在线影视| 本田岬高潮一区二区三区| 精品福利二区三区| 日韩高清欧美激情| 欧美日韩中文国产| 一区二区在线观看av| 暴力调教一区二区三区| 国产亚洲制服色| 精品写真视频在线观看| 日韩一区二区三区电影在线观看| 亚洲精品videosex极品| 99精品桃花视频在线观看| 国产精品视频第一区| 国产成人精品亚洲777人妖| 精品日韩在线一区| 久久狠狠亚洲综合| 欧美大肚乱孕交hd孕妇| 久久草av在线| 亚洲精品一区二区三区四区高清 | 日韩欧美一区二区不卡| 日韩电影免费一区| 91精品国产综合久久福利软件| 亚洲一区二区欧美| 欧美日韩一区成人| 亚洲bt欧美bt精品| 7777精品伊人久久久大香线蕉| 亚洲成人av福利| 91麻豆精品国产自产在线观看一区| 亚洲一区二区三区不卡国产欧美 | 99久久久精品| 日韩毛片视频在线看| 日本丶国产丶欧美色综合| 亚洲小少妇裸体bbw| 欧美日韩一区在线观看| 人人精品人人爱| 26uuu成人网一区二区三区| 国产91在线|亚洲| 国产精品麻豆99久久久久久| 在线免费不卡视频| 首页亚洲欧美制服丝腿| 欧美videos大乳护士334| 国产福利一区二区三区视频在线| 国产精品久久午夜| 在线亚洲+欧美+日本专区| 婷婷一区二区三区| 精品国产亚洲一区二区三区在线观看| 九九精品一区二区| 自拍偷拍亚洲欧美日韩| 欧美日韩视频第一区| 加勒比av一区二区| 亚洲男人电影天堂| 日韩精品一区二区三区四区 | 不卡一区二区在线| 亚洲成人精品影院| 久久久亚洲午夜电影| 日本道在线观看一区二区| 久久99久久99| **欧美大码日韩| 欧美一二三在线| 91在线视频免费91| 美女视频一区在线观看| 17c精品麻豆一区二区免费| 欧美男女性生活在线直播观看| 国产一级精品在线| 亚洲国产乱码最新视频| 国产日韩亚洲欧美综合| 7777精品久久久大香线蕉| 成人一区二区三区视频 | 国产 欧美在线| 丝瓜av网站精品一区二区| 国产精品二三区| 欧美一级生活片| 在线一区二区三区四区| 成人性视频免费网站| 蜜臀av一级做a爰片久久| 亚洲精选视频免费看| 亚洲国产精品黑人久久久| 日韩一级欧美一级| 在线观看一区二区视频| 成av人片一区二区| 国产成人综合在线观看| 蜜臀精品一区二区三区在线观看| 一区二区三区成人| 国产精品美女久久久久久久| 精品国产乱码91久久久久久网站| 欧美日韩中文另类| 欧美色窝79yyyycom| a4yy欧美一区二区三区| 国产成人午夜视频| 国产乱码精品一区二区三| 久久电影网站中文字幕| 麻豆精品在线播放| 日本vs亚洲vs韩国一区三区| 午夜一区二区三区视频| 亚洲成av人片在www色猫咪| 一区二区三区中文在线观看| 亚洲欧美日韩国产中文在线| 国产精品久久久久久久久免费桃花| 久久免费精品国产久精品久久久久| 在线不卡a资源高清| 欧美日韩国产小视频| 欧美美女网站色| 在线综合亚洲欧美在线视频| 91麻豆精品国产无毒不卡在线观看| 欧美日韩国产首页在线观看| 91精品免费在线观看| 日韩一区二区高清| 精品国产乱码久久久久久影片| 欧美成人一区二区三区片免费 | 欧美性videosxxxxx| 欧美四级电影在线观看| 欧美日韩夫妻久久| 日韩精品一区二区三区视频在线观看| 欧美一二三四在线| 国产欧美精品一区二区三区四区 | 国产一区二区日韩精品| 高清视频一区二区| 91天堂素人约啪| 欧美精品在线视频| 欧美成人aa大片| 国产精品盗摄一区二区三区| 一区二区三区日韩在线观看| 午夜精品aaa| 国产一区欧美一区| 99精品视频一区二区| 欧美无乱码久久久免费午夜一区| 欧美一区二区三区播放老司机| 2023国产一二三区日本精品2022| 欧美国产精品一区二区三区| 亚洲一区二区四区蜜桃| 日韩国产欧美一区二区三区| 国产精品一区免费在线观看| 91老师片黄在线观看| 日韩亚洲国产中文字幕欧美| 中文字幕va一区二区三区| 国产亚洲人成网站| 亚洲精品欧美综合四区| 久久国产日韩欧美精品| 97se亚洲国产综合自在线观| 这里只有精品免费| 亚洲美女偷拍久久| 韩国av一区二区三区| 日本高清不卡在线观看| 亚洲精品在线免费观看视频| 一区二区三区精品在线| 国产在线麻豆精品观看| 欧美日韩在线三级| 国产丝袜欧美中文另类| 天天综合日日夜夜精品|