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

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

?? common.php

?? asterisk 計費
?? PHP
?? 第 1 頁 / 共 5 頁
字號:
    /**
     * Automaticaly generates an insert or update query and pass it to prepare()
     *
     * @param string $table         the table name
     * @param array  $table_fields  the array of field names
     * @param int    $mode          a type of query to make:
     *                               DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE
     * @param string $where         for update queries: the WHERE clause to
     *                               append to the SQL statement.  Don't
     *                               include the "WHERE" keyword.
     *
     * @return resource  the query handle
     *
     * @uses DB_common::prepare(), DB_common::buildManipSQL()
     */
    function autoPrepare($table, $table_fields, $mode = DB_AUTOQUERY_INSERT,
                         $where = false)
    {
        $query = $this->buildManipSQL($table, $table_fields, $mode, $where);
        if (DB::isError($query)) {
            return $query;
        }
        return $this->prepare($query);
    }

    // }}}
    // {{{ autoExecute()

    /**
     * Automaticaly generates an insert or update query and call prepare()
     * and execute() with it
     *
     * @param string $table         the table name
     * @param array  $fields_values the associative array where $key is a
     *                               field name and $value its value
     * @param int    $mode          a type of query to make:
     *                               DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE
     * @param string $where         for update queries: the WHERE clause to
     *                               append to the SQL statement.  Don't
     *                               include the "WHERE" keyword.
     *
     * @return mixed  a new DB_result object for successful SELECT queries
     *                 or DB_OK for successul data manipulation queries.
     *                 A DB_Error object on failure.
     *
     * @uses DB_common::autoPrepare(), DB_common::execute()
     */
    function autoExecute($table, $fields_values, $mode = DB_AUTOQUERY_INSERT,
                         $where = false)
    {
        $sth = $this->autoPrepare($table, array_keys($fields_values), $mode,
                                  $where);
        if (DB::isError($sth)) {
            return $sth;
        }
        $ret =& $this->execute($sth, array_values($fields_values));
        $this->freePrepared($sth);
        return $ret;

    }

    // }}}
    // {{{ buildManipSQL()

    /**
     * Produces an SQL query string for autoPrepare()
     *
     * Example:
     * <pre>
     * buildManipSQL('table_sql', array('field1', 'field2', 'field3'),
     *               DB_AUTOQUERY_INSERT);
     * </pre>
     *
     * That returns
     * <samp>
     * INSERT INTO table_sql (field1,field2,field3) VALUES (?,?,?)
     * </samp>
     *
     * NOTES:
     *   - This belongs more to a SQL Builder class, but this is a simple
     *     facility.
     *   - Be carefull! If you don't give a $where param with an UPDATE
     *     query, all the records of the table will be updated!
     *
     * @param string $table         the table name
     * @param array  $table_fields  the array of field names
     * @param int    $mode          a type of query to make:
     *                               DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE
     * @param string $where         for update queries: the WHERE clause to
     *                               append to the SQL statement.  Don't
     *                               include the "WHERE" keyword.
     *
     * @return string  the sql query for autoPrepare()
     */
    function buildManipSQL($table, $table_fields, $mode, $where = false)
    {
        if (count($table_fields) == 0) {
            return $this->raiseError(DB_ERROR_NEED_MORE_DATA);
        }
        $first = true;
        switch ($mode) {
            case DB_AUTOQUERY_INSERT:
                $values = '';
                $names = '';
                foreach ($table_fields as $value) {
                    if ($first) {
                        $first = false;
                    } else {
                        $names .= ',';
                        $values .= ',';
                    }
                    $names .= $value;
                    $values .= '?';
                }
                return "INSERT INTO $table ($names) VALUES ($values)";
            case DB_AUTOQUERY_UPDATE:
                $set = '';
                foreach ($table_fields as $value) {
                    if ($first) {
                        $first = false;
                    } else {
                        $set .= ',';
                    }
                    $set .= "$value = ?";
                }
                $sql = "UPDATE $table SET $set";
                if ($where) {
                    $sql .= " WHERE $where";
                }
                return $sql;
            default:
                return $this->raiseError(DB_ERROR_SYNTAX);
        }
    }

    // }}}
    // {{{ execute()

    /**
     * Executes a DB statement prepared with prepare()
     *
     * Example 1.
     * <code>
     * $sth = $db->prepare('INSERT INTO tbl (a, b, c) VALUES (?, !, &)');
     * $data = array(
     *     "John's text",
     *     "'it''s good'",
     *     'filename.txt'
     * );
     * $res =& $db->execute($sth, $data);
     * </code>
     *
     * @param resource $stmt  a DB statement resource returned from prepare()
     * @param mixed    $data  array, string or numeric data to be used in
     *                         execution of the statement.  Quantity of items
     *                         passed must match quantity of placeholders in
     *                         query:  meaning 1 placeholder for non-array
     *                         parameters or 1 placeholder per array element.
     *
     * @return mixed  a new DB_result object for successful SELECT queries
     *                 or DB_OK for successul data manipulation queries.
     *                 A DB_Error object on failure.
     *
     * {@internal ibase and oci8 have their own execute() methods.}}
     *
     * @see DB_common::prepare()
     */
    function &execute($stmt, $data = array())
    {
        $realquery = $this->executeEmulateQuery($stmt, $data);
        if (DB::isError($realquery)) {
            return $realquery;
        }
        $result = $this->simpleQuery($realquery);

        if ($result === DB_OK || DB::isError($result)) {
            return $result;
        } else {
            $tmp =& new DB_result($this, $result);
            return $tmp;
        }
    }

    // }}}
    // {{{ executeEmulateQuery()

    /**
     * Emulates executing prepared statements if the DBMS not support them
     *
     * @param resource $stmt  a DB statement resource returned from execute()
     * @param mixed    $data  array, string or numeric data to be used in
     *                         execution of the statement.  Quantity of items
     *                         passed must match quantity of placeholders in
     *                         query:  meaning 1 placeholder for non-array
     *                         parameters or 1 placeholder per array element.
     *
     * @return mixed  a string containing the real query run when emulating
     *                 prepare/execute.  A DB_Error object on failure.
     *
     * @access protected
     * @see DB_common::execute()
     */
    function executeEmulateQuery($stmt, $data = array())
    {
        $stmt = (int)$stmt;
        $data = (array)$data;
        $this->last_parameters = $data;

        if (count($this->prepare_types[$stmt]) != count($data)) {
            $this->last_query = $this->prepared_queries[$stmt];
            return $this->raiseError(DB_ERROR_MISMATCH);
        }

        $realquery = $this->prepare_tokens[$stmt][0];

        $i = 0;
        foreach ($data as $value) {
            if ($this->prepare_types[$stmt][$i] == DB_PARAM_SCALAR) {
                $realquery .= $this->quoteSmart($value);
            } elseif ($this->prepare_types[$stmt][$i] == DB_PARAM_OPAQUE) {
                $fp = @fopen($value, 'rb');
                if (!$fp) {
                    return $this->raiseError(DB_ERROR_ACCESS_VIOLATION);
                }
                $realquery .= $this->quoteSmart(fread($fp, filesize($value)));
                fclose($fp);
            } else {
                $realquery .= $value;
            }

            $realquery .= $this->prepare_tokens[$stmt][++$i];
        }

        return $realquery;
    }

    // }}}
    // {{{ executeMultiple()

    /**
     * Performs several execute() calls on the same statement handle
     *
     * $data must be an array indexed numerically
     * from 0, one execute call is done for every "row" in the array.
     *
     * If an error occurs during execute(), executeMultiple() does not
     * execute the unfinished rows, but rather returns that error.
     *
     * @param resource $stmt  query handle from prepare()
     * @param array    $data  numeric array containing the
     *                         data to insert into the query
     *
     * @return int  DB_OK on success.  A DB_Error object on failure.
     *
     * @see DB_common::prepare(), DB_common::execute()
     */
    function executeMultiple($stmt, $data)
    {
        foreach ($data as $value) {
            $res =& $this->execute($stmt, $value);
            if (DB::isError($res)) {
                return $res;
            }
        }
        return DB_OK;
    }

    // }}}
    // {{{ freePrepared()

    /**
     * Frees the internal resources associated with a prepared query
     *
     * @param resource $stmt           the prepared statement's PHP resource
     * @param bool     $free_resource  should the PHP resource be freed too?
     *                                  Use false if you need to get data
     *                                  from the result set later.
     *
     * @return bool  TRUE on success, FALSE if $result is invalid
     *
     * @see DB_common::prepare()
     */
    function freePrepared($stmt, $free_resource = true)
    {
        $stmt = (int)$stmt;
        if (isset($this->prepare_tokens[$stmt])) {
            unset($this->prepare_tokens[$stmt]);
            unset($this->prepare_types[$stmt]);
            unset($this->prepared_queries[$stmt]);
            return true;
        }
        return false;
    }

    // }}}
    // {{{ modifyQuery()

    /**
     * Changes a query string for various DBMS specific reasons
     *
     * It is defined here to ensure all drivers have this method available.
     *
     * @param string $query  the query string to modify
     *
     * @return string  the modified query string
     *
     * @access protected
     * @see DB_mysql::modifyQuery(), DB_oci8::modifyQuery(),
     *      DB_sqlite::modifyQuery()
     */
    function modifyQuery($query)
    {
        return $query;
    }

    // }}}
    // {{{ modifyLimitQuery()

    /**
     * Adds LIMIT clauses to a query string according to current DBMS standards
     *
     * It is defined here to assure that all implementations
     * have this method defined.
     *
     * @param string $query   the query to modify
     * @param int    $from    the row to start to fetching (0 = the first row)
     * @param int    $count   the numbers of rows to fetch
     * @param mixed  $params  array, string or numeric data to be used in
     *                         execution of the statement.  Quantity of items
     *                         passed must match quantity of placeholders in
     *                         query:  meaning 1 placeholder for non-array
     *                         parameters or 1 placeholder per array element.
     *
     * @return string  the query string with LIMIT clauses added
     *
     * @access protected
     */
    function modifyLimitQuery($query, $from, $count, $params = array())
    {
        return $query;
    }

    // }}}
    // {{{ query()

    /**
     * Sends a query to the database server
     *
     * The query string can be either a normal statement to be sent directly
     * to the server OR if <var>$params</var> are passed the query can have
     * placeholders and it will be passed through prepare() and execute().
     *
     * @param string $query   the SQL query or the statement to prepare
     * @param mixed  $params  array, string or numeric data to be used in
     *                         execution of the statement.  Quantity of items
     *                         passed must match quantity of placeholders in
     *                         query:  meaning 1 placeholder for non-array
     *                         parameters or 1 placeholder per array element.
     *
     * @return mixed  a new DB_result object for successful SELECT queries
     *                 or DB_OK for successul data manipulation queries.
     *                 A DB_Error object on failure.
     *
     * @see DB_result, DB_common::prepare(), DB_common::execute()
     */
    function &query($query, $params = array())
    {
        if (sizeof($params) > 0) {
            $sth = $this->prepare($query);
            if (DB::isError($sth)) {
                return $sth;
            }
            $ret =& $this->execute($sth, $params);
            $this->freePrepared($sth, false);
            return $ret;
        } else {
            $this->last_parameters = array();
            $result = $this->simpleQuery($query);
            if ($result === DB_OK || DB::isError($result)) {
                return $result;
            } else {
                $tmp =& new DB_result($this, $result);
                return $tmp;
            }
        }
    }

    // }}}
    // {{{ limitQuery()

    /**
     * Generates and executes a LIMIT query

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人一区二区精品非洲| 国产高清久久久久| 中文字幕av资源一区| 在线观看亚洲专区| 国产91综合一区在线观看| 日韩高清电影一区| 亚洲欧美视频一区| 久久久久国产精品人| 欧美一三区三区四区免费在线看 | 久久久久久久综合| 欧美日韩高清不卡| 色94色欧美sute亚洲线路一ni| 国产美女在线精品| 美美哒免费高清在线观看视频一区二区 | 欧美aⅴ一区二区三区视频| 中文字幕一区二区三区不卡| 日韩欧美国产小视频| 精品视频999| 91同城在线观看| 成人的网站免费观看| 国产精品系列在线观看| 国产在线播放一区三区四| 日韩中文字幕不卡| 亚洲成a人在线观看| 一区二区三区在线播放| 中文字幕中文乱码欧美一区二区| 久久午夜国产精品| 精品嫩草影院久久| 精品少妇一区二区三区日产乱码| 91精品视频网| 欧美狂野另类xxxxoooo| 欧美亚洲精品一区| 在线亚洲人成电影网站色www| 一本到三区不卡视频| 成人av网站大全| 成人午夜av在线| 成人黄色一级视频| 成人精品亚洲人成在线| 99re这里只有精品首页| 97久久精品人人做人人爽| 99久久精品免费看国产免费软件| 不卡在线观看av| 91麻豆免费看| 欧美在线一区二区三区| 欧美日韩一级二级三级| 在线综合视频播放| 精品国精品自拍自在线| 国产日韩高清在线| 中文字幕一区二区三区精华液 | 蜜臀精品久久久久久蜜臀 | 综合久久国产九一剧情麻豆| 亚洲女女做受ⅹxx高潮| 亚洲国产欧美在线| 五月婷婷另类国产| 老司机免费视频一区二区| 久久国产精品99精品国产 | 一本大道久久a久久精二百| 日本久久精品电影| 91精品一区二区三区在线观看| 欧美成人bangbros| 国产蜜臀97一区二区三区| 国产精品久久久久久久久搜平片| 一区二区三区四区激情| 日韩精品亚洲一区二区三区免费| 国产自产视频一区二区三区| eeuss鲁片一区二区三区| 欧美日韩一本到| 精品国产免费视频| 国产精品美女久久久久久久| 亚洲国产成人av好男人在线观看| 精品无码三级在线观看视频| 99久久国产综合精品色伊| 欧美丰满少妇xxxxx高潮对白| 久久久久久久久久美女| 亚洲激情在线播放| 久久国产精品无码网站| 99精品久久只有精品| 91精品国产美女浴室洗澡无遮挡| 国产亚洲成aⅴ人片在线观看| 一区二区三区精品在线观看| 蜜桃久久av一区| 99久久综合色| 欧美不卡123| 亚洲精品视频一区| 国内精品久久久久影院色 | 91成人免费电影| 精品国产伦一区二区三区观看体验| 国产精品国产三级国产aⅴ中文 | 美女国产一区二区| 91网站最新地址| 精品久久久久久无| 亚洲精品欧美二区三区中文字幕| 久久成人免费日本黄色| 欧洲视频一区二区| 久久亚洲影视婷婷| 石原莉奈在线亚洲二区| 99国内精品久久| 久久综合九色综合97_久久久| 亚洲成a人片综合在线| proumb性欧美在线观看| 精品久久一区二区| 日韩制服丝袜av| 色老汉一区二区三区| 久久久精品人体av艺术| 日韩av在线免费观看不卡| 97久久超碰国产精品| 国产亚洲欧美中文| 蜜臀av性久久久久蜜臀av麻豆| 在线视频欧美精品| 亚洲视频 欧洲视频| 成人午夜免费av| 精品国产一区二区三区久久影院| 午夜精彩视频在线观看不卡| 91网页版在线| 一区二区中文视频| 国产99一区视频免费| 精品国产伦理网| 精品一区二区影视| 日韩欧美国产精品一区| 丝袜诱惑制服诱惑色一区在线观看 | 国产在线日韩欧美| 精品国产一区二区在线观看| 免费成人美女在线观看.| 欧美日韩一区二区在线视频| 一区二区三区在线影院| 一本大道久久a久久综合婷婷| 国产精品白丝在线| 99久久久无码国产精品| 1000精品久久久久久久久| 成人av在线观| 1024国产精品| 色狠狠综合天天综合综合| 综合精品久久久| 在线亚洲一区观看| 亚洲午夜羞羞片| 欧美性受xxxx黑人xyx性爽| 一区二区三区四区不卡在线 | 亚洲欧美视频在线观看视频| 91亚洲午夜精品久久久久久| 亚洲免费在线视频| 欧美在线色视频| 五月综合激情网| 欧美成人a在线| 国产成人综合在线观看| 国产精品女主播在线观看| 成a人片国产精品| 亚洲精品亚洲人成人网在线播放| 欧美色区777第一页| 日韩不卡在线观看日韩不卡视频| 欧美一级日韩免费不卡| 激情五月激情综合网| 国产偷v国产偷v亚洲高清| www.亚洲色图.com| 一区二区三区中文免费| 欧美一区二区在线免费观看| 精品亚洲porn| 综合在线观看色| 欧美精品一二三区| 韩国女主播成人在线观看| 国产精品三级电影| 在线视频综合导航| 久久99深爱久久99精品| 欧美国产乱子伦| 欧美久久高跟鞋激| 秋霞av亚洲一区二区三| 久久综合色之久久综合| av电影在线观看完整版一区二区| 亚洲综合激情网| 日韩欧美国产高清| 99久久久精品免费观看国产蜜| 性欧美大战久久久久久久久| 久久久久久久一区| 欧美色图在线观看| 精品一区免费av| 一区二区三区日韩欧美| 精品国产在天天线2019| 在线精品视频免费播放| 韩日精品视频一区| 一区二区三区av电影| 久久综合一区二区| 欧美写真视频网站| 国产福利一区二区三区在线视频| 一区二区三区国产| 久久久久久久精| 欧美日韩高清一区二区| 成人午夜av影视| 六月丁香婷婷久久| 亚洲免费三区一区二区| 精品国产乱码久久久久久闺蜜| 色综合天天综合在线视频| 老司机精品视频一区二区三区| 亚洲黄色免费网站| 久久久久国产精品麻豆ai换脸| 欧美专区亚洲专区| 成人一区二区三区视频在线观看| 日韩二区在线观看| 洋洋成人永久网站入口| 国产欧美日韩在线看| 欧美一区二区成人| 欧美日韩在线电影|