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

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

?? pgsql.php

?? PhpWiki是sourceforge的一個開源項目
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?php/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */// +----------------------------------------------------------------------+// | PHP Version 4                                                        |// +----------------------------------------------------------------------+// | Copyright (c) 1997-2004 The PHP Group                                |// +----------------------------------------------------------------------+// | This source file is subject to version 2.02 of the PHP license,      |// | that is bundled with this package in the file LICENSE, and is        |// | available at through the world-wide-web at                           |// | http://www.php.net/license/2_02.txt.                                 |// | If you did not receive a copy of the PHP license and are unable to   |// | obtain it through the world-wide-web, please send a note to          |// | license@php.net so we can mail you a copy immediately.               |// +----------------------------------------------------------------------+// | Authors: Rui Hirokawa <hirokawa@php.net>                             |// |          Stig Bakken <ssb@php.net>                                   |// | Maintainer: Daniel Convissor <danielc@php.net>                       |// +----------------------------------------------------------------------+//// $Id: pgsql.php,v 1.5 2004/06/21 08:39:38 rurban Exp $require_once 'DB/common.php';/** * Database independent query interface definition for PHP's PostgreSQL * extension. * * @package  DB * @version  $Id: pgsql.php,v 1.5 2004/06/21 08:39:38 rurban Exp $ * @category Database * @author   Rui Hirokawa <hirokawa@php.net> * @author   Stig Bakken <ssb@php.net> */class DB_pgsql extends DB_common{    // {{{ properties    var $connection;    var $phptype, $dbsyntax;    var $prepare_tokens = array();    var $prepare_types = array();    var $transaction_opcount = 0;    var $dsn = array();    var $row = array();    var $num_rows = array();    var $affected = 0;    var $autocommit = true;    var $fetchmode = DB_FETCHMODE_ORDERED;    // }}}    // {{{ constructor    function DB_pgsql()    {        $this->DB_common();        $this->phptype = 'pgsql';        $this->dbsyntax = 'pgsql';        $this->features = array(            'prepare' => false,            'pconnect' => true,            'transactions' => true,            'limit' => 'alter'        );        $this->errorcode_map = array(        );    }    // }}}    // {{{ connect()    /**     * Connect to a database and log in as the specified user.     *     * @param $dsn the data source name (see DB::parseDSN for syntax)     * @param $persistent (optional) whether the connection should     *        be persistent     *     * @return int DB_OK on success, a DB error code on failure.     */    function connect($dsninfo, $persistent = false)    {        if (!DB::assertExtension('pgsql')) {            return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND);        }        $this->dsn = $dsninfo;        $protocol = $dsninfo['protocol'] ? $dsninfo['protocol'] : 'tcp';        $connstr = '';        if ($protocol == 'tcp') {            if ($dsninfo['hostspec']) {                $connstr .= 'host=' . $dsninfo['hostspec'];            }            if ($dsninfo['port']) {                $connstr .= ' port=' . $dsninfo['port'];            }        } elseif ($protocol == 'unix') {            // Allow for pg socket in non-standard locations.            if ($dsninfo['socket']) {                $connstr .= 'host=' . $dsninfo['socket'];            }        }        if ($dsninfo['database']) {            $connstr .= ' dbname=\'' . addslashes($dsninfo['database']) . '\'';        }        if ($dsninfo['username']) {            $connstr .= ' user=\'' . addslashes($dsninfo['username']) . '\'';        }        if ($dsninfo['password']) {            $connstr .= ' password=\'' . addslashes($dsninfo['password']) . '\'';        }        if (isset($dsninfo['options'])) {            $connstr .= ' options=' . $dsninfo['options'];        }        if (isset($dsninfo['tty'])) {            $connstr .= ' tty=' . $dsninfo['tty'];        }        $connect_function = $persistent ? 'pg_pconnect' : 'pg_connect';        // catch error        ob_start();        $conn = $connect_function($connstr);        $error = ob_get_contents();        ob_end_clean();        if ($conn == false) {            return $this->raiseError(DB_ERROR_CONNECT_FAILED, null,                                     null, null, strip_tags($error));        }        $this->connection = $conn;        return DB_OK;    }    // }}}    // {{{ disconnect()    /**     * Log out and disconnect from the database.     *     * @return bool true on success, false if not connected.     */    function disconnect()    {        $ret = @pg_close($this->connection);        $this->connection = null;        return $ret;    }    // }}}    // {{{ simpleQuery()    /**     * Send a query to PostgreSQL and return the results as a     * PostgreSQL resource identifier.     *     * @param $query the SQL query     *     * @return int returns a valid PostgreSQL result for successful SELECT     * queries, DB_OK for other successful queries.  A DB error code     * is returned on failure.     */    function simpleQuery($query)    {        $ismanip = DB::isManip($query);        $this->last_query = $query;        $query = $this->modifyQuery($query);        if (!$this->autocommit && $ismanip) {            if ($this->transaction_opcount == 0) {                $result = @pg_exec($this->connection, 'begin;');                if (!$result) {                    return $this->pgsqlRaiseError();                }            }            $this->transaction_opcount++;        }        $result = @pg_exec($this->connection, $query);        if (!$result) {            return $this->pgsqlRaiseError();        }        // Determine which queries that should return data, and which        // should return an error code only.        if ($ismanip) {            $this->affected = @pg_cmdtuples($result);            return DB_OK;        } elseif (preg_match('/^\s*\(?\s*(SELECT(?!\s+INTO)|EXPLAIN|SHOW)\s/si', $query)) {            /* PostgreSQL commands:               ABORT, ALTER, BEGIN, CLOSE, CLUSTER, COMMIT, COPY,               CREATE, DECLARE, DELETE, DROP TABLE, EXPLAIN, FETCH,               GRANT, INSERT, LISTEN, LOAD, LOCK, MOVE, NOTIFY, RESET,               REVOKE, ROLLBACK, SELECT, SELECT INTO, SET, SHOW,               UNLISTEN, UPDATE, VACUUM            */            $this->row[(int)$result] = 0; // reset the row counter.            $numrows = $this->numrows($result);            if (is_object($numrows)) {                return $numrows;            }            $this->num_rows[(int)$result] = $numrows;            $this->affected = 0;            return $result;        } else {            $this->affected = 0;            return DB_OK;        }    }    // }}}    // {{{ nextResult()    /**     * Move the internal pgsql result pointer to the next available result     *     * @param a valid fbsql result resource     *     * @access public     *     * @return true if a result is available otherwise return false     */    function nextResult($result)    {        return false;    }    // }}}    // {{{ errorCode()    /**     * Determine PEAR::DB error code from the database's text error message.     *     * @param  string  $errormsg  error message returned from the database     * @return integer  an error number from a DB error constant     */    function errorCode($errormsg)    {        static $error_regexps;        if (!isset($error_regexps)) {            $error_regexps = array(                '/(([Rr]elation|[Ss]equence|[Tt]able)( [\"\'].*[\"\'])? does not exist|[Cc]lass ".+" not found)$/' => DB_ERROR_NOSUCHTABLE,                '/[Cc]olumn [\"\'].*[\"\'] does not exist/' => DB_ERROR_NOSUCHFIELD,                '/[Rr]elation [\"\'].*[\"\'] already exists|[Cc]annot insert a duplicate key into (a )?unique index.*/' => DB_ERROR_ALREADY_EXISTS,                '/(divide|division) by zero$/'          => DB_ERROR_DIVZERO,                '/pg_atoi: error in .*: can\'t parse /' => DB_ERROR_INVALID_NUMBER,                '/invalid input syntax for integer/'    => DB_ERROR_INVALID_NUMBER,                '/ttribute [\"\'].*[\"\'] not found$|[Rr]elation [\"\'].*[\"\'] does not have attribute [\"\'].*[\"\']/' => DB_ERROR_NOSUCHFIELD,                '/parser: parse error at or near \"/'   => DB_ERROR_SYNTAX,                '/syntax error at/'                     => DB_ERROR_SYNTAX,                '/violates not-null constraint/'        => DB_ERROR_CONSTRAINT_NOT_NULL,                '/violates [\w ]+ constraint/'          => DB_ERROR_CONSTRAINT,                '/referential integrity violation/'     => DB_ERROR_CONSTRAINT            );        }        foreach ($error_regexps as $regexp => $code) {            if (preg_match($regexp, $errormsg)) {                return $code;            }        }        // Fall back to DB_ERROR if there was no mapping.        return DB_ERROR;    }    // }}}    // {{{ fetchInto()    /**     * Fetch a row and insert the data into an existing array.     *     * Formating of the array and the data therein are configurable.     * See DB_result::fetchInto() for more information.     *     * @param resource $result    query result identifier     * @param array    $arr       (reference) array where data from the row     *                            should be placed     * @param int      $fetchmode how the resulting array should be indexed     * @param int      $rownum    the row number to fetch     *     * @return mixed DB_OK on success, null when end of result set is     *               reached or on failure     *     * @see DB_result::fetchInto()     * @access private     */    function fetchInto($result, &$arr, $fetchmode, $rownum=null)    {        $rownum = ($rownum !== null) ? $rownum : $this->row[$result];        if ($rownum >= $this->num_rows[$result]) {            return null;        }        if ($fetchmode & DB_FETCHMODE_ASSOC) {            $arr = @pg_fetch_array($result, $rownum, PGSQL_ASSOC);            if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE && $arr) {                $arr = array_change_key_case($arr, CASE_LOWER);            }        } else {            $arr = @pg_fetch_row($result, $rownum);        }        if (!$arr) {            $err = pg_errormessage($this->connection);            if (!$err) {                return null;            }            return $this->pgsqlRaiseError();        }        if ($this->options['portability'] & DB_PORTABILITY_RTRIM) {            $this->_rtrimArrayValues($arr);        }        if ($this->options['portability'] & DB_PORTABILITY_NULL_TO_EMPTY) {            $this->_convertNullArrayValuesToEmpty($arr);        }        $this->row[$result] = ++$rownum;        return DB_OK;    }    // }}}    // {{{ freeResult()    /**     * Free the internal resources associated with $result.     *     * @param $result int PostgreSQL result identifier     *     * @return bool true on success, false if $result is invalid     */    function freeResult($result)    {        if (is_resource($result)) {            unset($this->row[(int)$result]);            unset($this->num_rows[(int)$result]);            $this->affected = 0;            return @pg_freeresult($result);        }        return false;    }    // }}}    // {{{ quote()    /**     * @deprecated  Deprecated in release 1.6.0     * @internal     */    function quote($str) {        return $this->quoteSmart($str);    }    // }}}    // {{{ quoteSmart()    /**     * Format input so it can be safely used in a query     *     * @param mixed $in  data to be quoted     *     * @return mixed Submitted variable's type = returned value:     *               + null = the string <samp>NULL</samp>     *               + boolean = string <samp>TRUE</samp> or <samp>FALSE</samp>     *               + integer or double = the unquoted number     *               + other (including strings and numeric strings) =     *                 the data escaped according to MySQL's settings     *                 then encapsulated between single quotes     *     * @internal     */    function quoteSmart($in)    {        if (is_int($in) || is_double($in)) {            return $in;        } elseif (is_bool($in)) {            return $in ? 'TRUE' : 'FALSE';        } elseif (is_null($in)) {            return 'NULL';        } else {            return "'" . $this->escapeSimple($in) . "'";        }    }    // }}}    // {{{ escapeSimple()    /**     * Escape a string according to the current DBMS's standards     *     * PostgreSQL treats a backslash as an escape character, so they are     * removed.     *     * Not using pg_escape_string() yet because it requires PostgreSQL     * to be at version 7.2 or greater.     *     * @param string $str  the string to be escaped     *     * @return string  the escaped string     *     * @internal     */    function escapeSimple($str) {        return str_replace("'", "''", str_replace('\\', '\\\\', $str));    }    // }}}    // {{{ numCols()    /**     * Get the number of columns in a result set.     *     * @param $result resource PostgreSQL result identifier     *     * @return int the number of columns per row in $result     */    function numCols($result)    {        $cols = @pg_numfields($result);        if (!$cols) {            return $this->pgsqlRaiseError();        }        return $cols;    }    // }}}    // {{{ numRows()

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美本精品男人aⅴ天堂| 亚洲国产美国国产综合一区二区| 日韩视频123| 制服.丝袜.亚洲.另类.中文| 欧美日韩国产经典色站一区二区三区| 色88888久久久久久影院按摩| gogogo免费视频观看亚洲一| 成人h动漫精品| 成人av资源在线观看| www.久久精品| 91一区二区三区在线观看| 99久久精品免费观看| 97精品视频在线观看自产线路二 | 色婷婷国产精品| 91在线免费看| 91国偷自产一区二区开放时间| 色婷婷av久久久久久久| 欧美色图在线观看| 欧美丰满少妇xxxbbb| 欧美一区二区在线播放| 日韩欧美中文字幕精品| 久久综合久久综合九色| 欧美国产97人人爽人人喊| 亚洲欧美综合网| 亚洲午夜一二三区视频| 青青草97国产精品免费观看| 紧缚捆绑精品一区二区| 从欧美一区二区三区| 色综合久久久久久久久久久| 欧美人伦禁忌dvd放荡欲情| 日韩一级黄色片| 国产亚洲福利社区一区| 国产精品成人一区二区三区夜夜夜| 亚洲色图在线视频| 日日骚欧美日韩| 国产精品18久久久久久久久久久久 | 亚洲自拍偷拍av| 欧美a一区二区| 国产成人午夜99999| 91国产成人在线| 日韩欧美国产精品一区| 中文字幕一区二区在线观看| 亚洲成人免费视频| 激情五月婷婷综合| 91麻豆精品在线观看| 日韩三级电影网址| 日韩一区在线免费观看| 日韩电影在线看| 成+人+亚洲+综合天堂| 91麻豆精品国产91久久久久久久久| 久久久噜噜噜久久人人看| 一区二区三区国产| 精品一区二区三区av| 在线精品视频一区二区| 国产亚洲欧美日韩日本| 亚洲国产日日夜夜| 高清国产午夜精品久久久久久| 欧美日本一区二区在线观看| 国产欧美日韩视频在线观看| 五月天激情综合网| proumb性欧美在线观看| 精品乱人伦小说| 亚洲一区二区在线播放相泽| 国产91色综合久久免费分享| 在线观看91精品国产麻豆| 国产精品久久久久影院亚瑟| 首页综合国产亚洲丝袜| 91麻豆免费在线观看| 久久这里只有精品视频网| 亚洲国产精品久久人人爱蜜臀| 国产一区二区不卡在线| 制服丝袜亚洲色图| 亚洲另类中文字| 国产精品亚洲视频| 欧美一级高清大全免费观看| 亚洲一区二区三区四区不卡| 成人av在线播放网站| 久久亚洲精精品中文字幕早川悠里 | 国产欧美一区在线| 久久国产精品99久久久久久老狼 | av午夜精品一区二区三区| 精品国产免费久久| 婷婷丁香激情综合| 欧美性色黄大片手机版| 自拍av一区二区三区| 丁香激情综合五月| 久久久影视传媒| 久久国产精品99精品国产| 欧美日韩高清在线| 亚洲一卡二卡三卡四卡无卡久久| 97成人超碰视| 亚洲欧美综合色| www.亚洲国产| 国产精品麻豆久久久| 国产成人午夜精品影院观看视频 | 欧美极品另类videosde| 韩国成人精品a∨在线观看| 欧美一区二区三区男人的天堂| 亚洲成人免费观看| 欧美日韩在线精品一区二区三区激情| 亚洲男人的天堂av| 91理论电影在线观看| 综合欧美亚洲日本| 91蜜桃在线免费视频| 日韩理论片网站| 91一区在线观看| 亚洲精品一二三四区| 在线观看www91| 亚洲一区二区三区中文字幕| 欧美中文字幕亚洲一区二区va在线| 一区二区三区欧美在线观看| 色88888久久久久久影院野外 | 国产精品99久久久久| 久久久久久久久久美女| 丁香婷婷综合激情五月色| 国产精品你懂的在线| 97成人超碰视| 亚洲一区二区三区在线看| 欧美日韩www| 免费观看一级欧美片| 337p粉嫩大胆色噜噜噜噜亚洲| 国产盗摄一区二区三区| 亚洲欧洲日产国产综合网| 色婷婷狠狠综合| 日欧美一区二区| 精品sm捆绑视频| 成人久久18免费网站麻豆| 亚洲蜜臀av乱码久久精品| 欧美四级电影在线观看| 六月丁香婷婷久久| 国产视频视频一区| 91色乱码一区二区三区| 五月天欧美精品| 精品88久久久久88久久久| 成人小视频在线| 亚洲一区二区中文在线| 欧美videos大乳护士334| 韩国女主播一区| 日韩毛片一二三区| 欧美一区二区三区免费视频| 国产成人在线视频网址| 一区二区三区成人| 日韩亚洲欧美一区| 国产成人av一区二区三区在线| 亚洲激情男女视频| 欧美一区二区三区性视频| 成人综合婷婷国产精品久久蜜臀| 亚洲综合精品自拍| 精品国产乱码久久| 91浏览器入口在线观看| 久久成人精品无人区| 亚洲你懂的在线视频| 欧美草草影院在线视频| 91麻豆视频网站| 久久99热国产| 一二三四区精品视频| 国产性色一区二区| 欧美日韩中文国产| 成人免费看视频| 日本成人中文字幕在线视频| 亚洲欧美在线观看| 日韩欧美专区在线| 欧美羞羞免费网站| 丁香网亚洲国际| 日av在线不卡| 夜夜操天天操亚洲| 亚洲国产成人一区二区三区| 在线成人高清不卡| 99久久亚洲一区二区三区青草| 久久精品国产精品亚洲综合| 亚洲精品高清在线观看| 久久久久久黄色| 91精品国产综合久久久久久漫画| av欧美精品.com| 九色综合狠狠综合久久| 天天影视涩香欲综合网| 亚洲欧洲三级电影| 久久先锋资源网| 日韩女优电影在线观看| 欧美日韩一区二区三区在线看 | 国产精品午夜免费| 日韩欧美你懂的| 欧美蜜桃一区二区三区| 一本久道中文字幕精品亚洲嫩| 国产一区二区毛片| 久久精品国产77777蜜臀| 亚洲国产日韩a在线播放性色| 国产精品电影一区二区三区| 2021中文字幕一区亚洲| 日韩美女一区二区三区| 欧美一区日韩一区| 欧美日韩成人综合天天影院| 色综合久久综合网| 成人一区二区视频| 国产精品99久久久久久有的能看 | 欧美体内she精视频| 91毛片在线观看| 91麻豆免费观看| 91小视频免费看| 91亚洲午夜精品久久久久久|