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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pgsql.php

?? PhpWiki是sourceforge的一個(gè)開源項(xiàng)目
?? PHP
?? 第 1 頁 / 共 2 頁
字號(hào):
<?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()

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av男人天堂一区| 欧美精品自拍偷拍| 午夜激情一区二区| 国产人成亚洲第一网站在线播放| 欧美视频一区在线观看| 九九九精品视频| 亚洲电影视频在线| 亚洲天堂网中文字| 久久婷婷成人综合色| 欧美亚洲国产一区二区三区va | 国产成+人+日韩+欧美+亚洲| 亚洲高清一区二区三区| 国产精品不卡在线观看| 精品国产在天天线2019| 欧美日韩视频第一区| 91同城在线观看| 国产成人午夜精品5599| 秋霞午夜av一区二区三区| 一区二区三区国产| 国产欧美一区二区精品忘忧草| 欧美大度的电影原声| 欧美老女人在线| 欧美伊人久久大香线蕉综合69| 成人av动漫网站| 国产成人h网站| 国产精品白丝av| 国产伦精品一区二区三区免费| 首页国产欧美日韩丝袜| 亚洲成av人影院在线观看网| 亚洲国产精品一区二区尤物区| 亚洲视频一区二区在线| 日韩一区日韩二区| 国产精品免费视频网站| 中文字幕免费不卡| 国产精品美女久久久久久2018| 26uuu国产一区二区三区| 欧美一级理论性理论a| 日韩一区二区三| 日韩免费看的电影| 亚洲精品一区二区三区蜜桃下载| 欧美成人免费网站| 久久久久久免费| 国产亚洲一本大道中文在线| 中文字幕免费一区| 亚洲视频 欧洲视频| 亚洲精品国产无套在线观| 一区二区日韩电影| 午夜久久久影院| 日本中文一区二区三区| 久久国产精品色婷婷| 国产一区不卡视频| 懂色av中文一区二区三区| 不卡大黄网站免费看| 91香蕉视频mp4| 欧美色中文字幕| 91精品在线一区二区| 精品国产一区二区三区久久久蜜月| 精品日本一线二线三线不卡| 久久综合99re88久久爱| 国产精品毛片久久久久久| 亚洲另类在线一区| 五月天视频一区| 国产专区欧美精品| 成人av在线播放网址| 欧美日韩一级大片网址| 欧美成人免费网站| **欧美大码日韩| 午夜精品福利视频网站| 国产一区视频导航| 91麻豆国产在线观看| 7777女厕盗摄久久久| 久久久美女艺术照精彩视频福利播放| 中文字幕欧美日本乱码一线二线| 亚洲精品国产a久久久久久| 美女尤物国产一区| 成人涩涩免费视频| 欧美军同video69gay| 国产色产综合产在线视频| 伊人夜夜躁av伊人久久| 激情图片小说一区| 在线观看亚洲专区| 久久亚洲精精品中文字幕早川悠里 | 97aⅴ精品视频一二三区| 欧美日韩国产一级二级| 国产亚洲综合色| 亚洲国产精品一区二区www| 国产激情偷乱视频一区二区三区 | 精品视频999| 久久女同互慰一区二区三区| 一区二区三区在线视频免费| 国产一区二区精品在线观看| 欧美无人高清视频在线观看| 久久精品网站免费观看| 日韩高清电影一区| 91美女在线视频| 久久综合网色—综合色88| 亚洲精品高清在线观看| 高潮精品一区videoshd| 欧美日韩激情在线| 最新久久zyz资源站| 麻豆国产精品一区二区三区| 色婷婷国产精品久久包臀| 久久精品在这里| 久久精品国产一区二区三区免费看| 91在线看国产| 国产欧美精品一区二区色综合| 日本特黄久久久高潮| 日本韩国欧美国产| 国产精品麻豆99久久久久久| 久久福利视频一区二区| 69堂亚洲精品首页| 亚洲一区二区欧美| 91色在线porny| 欧美国产精品劲爆| 国产黑丝在线一区二区三区| 日韩欧美高清一区| 日本成人在线电影网| 欧美日韩一区二区三区不卡| 亚洲精品中文字幕乱码三区| 成人美女视频在线看| 亚洲国产精品av| 国产高清不卡一区| 久久五月婷婷丁香社区| 久草精品在线观看| 精品国产髙清在线看国产毛片| 日韩二区三区在线观看| 51精品秘密在线观看| 午夜精品福利在线| 在线成人av网站| 日韩经典一区二区| 欧美一区二区三区在| 日本伊人精品一区二区三区观看方式| 欧美三级欧美一级| 五月天激情小说综合| 欧美日韩激情一区二区三区| 亚洲国产视频在线| 欧美日韩精品一区二区天天拍小说 | 欧美优质美女网站| 一区二区在线看| 在线观看中文字幕不卡| 亚洲18女电影在线观看| 在线播放国产精品二区一二区四区 | 99re免费视频精品全部| 1000精品久久久久久久久| 一本一本久久a久久精品综合麻豆| 中文字幕亚洲在| 在线免费观看日本一区| 亚洲v日本v欧美v久久精品| 在线综合视频播放| 久久99国产精品久久| 久久婷婷国产综合国色天香| 国产+成+人+亚洲欧洲自线| 国产精品盗摄一区二区三区| 91视频在线观看免费| 午夜精品久久久久久久| 日韩精品专区在线影院重磅| 国产精品资源在线| 国产精品夫妻自拍| 欧美午夜精品一区二区三区| 日韩成人免费电影| 2021国产精品久久精品| 91在线码无精品| 日本va欧美va欧美va精品| 国产欧美日韩在线| 91福利在线播放| 麻豆成人综合网| 国产精品你懂的| 欧美伦理影视网| 国产一区二区免费看| 亚洲精品高清视频在线观看| 欧美一区二区三区免费在线看| 国产高清在线观看免费不卡| 亚洲欧美日韩国产成人精品影院| 欧美精品久久99| 国产福利视频一区二区三区| 一区二区高清免费观看影视大全| 在线播放中文一区| 99国产精品久久久久久久久久 | 日韩一区中文字幕| 欧美老年两性高潮| 成人午夜又粗又硬又大| 亚洲一区二区三区四区不卡| 久久免费美女视频| 欧美三级午夜理伦三级中视频| 久久99精品久久久久久久久久久久| 国产精品久久久久久久浪潮网站 | 亚洲丝袜自拍清纯另类| 91精品国产色综合久久ai换脸 | 日韩视频免费直播| 99精品欧美一区二区三区小说| 喷水一区二区三区| 一区二区三区在线免费观看| 久久久综合九色合综国产精品| 欧美日韩亚洲综合一区| 成人一区在线观看| 蜜臀精品久久久久久蜜臀| 亚洲免费av网站| 久久久精品天堂| 51久久夜色精品国产麻豆| 91麻豆6部合集magnet|