当前位置: 首页>>代码示例>>PHP>>正文


PHP _adodb_column_sql_oci8函数代码示例

本文整理汇总了PHP中_adodb_column_sql_oci8函数的典型用法代码示例。如果您正苦于以下问题:PHP _adodb_column_sql_oci8函数的具体用法?PHP _adodb_column_sql_oci8怎么用?PHP _adodb_column_sql_oci8使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_adodb_column_sql_oci8函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _adodb_column_sql

function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq, $recurse = true)
{
    if ($recurse) {
        switch ($zthis->dataProvider) {
            case 'postgres':
                if ($type == 'L') {
                    $type = 'C';
                }
                break;
            case 'oci8':
                return _adodb_column_sql_oci8($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq);
        }
    }
    $sql = '';
    switch ($type) {
        case "C":
        case "X":
        case 'B':
            if ($action == 'I') {
                $sql = $zthis->qstr($arrFields[$fname], $magicq) . ", ";
            } else {
                $sql .= $fnameq . "=" . $zthis->qstr($arrFields[$fname], $magicq) . ", ";
            }
            break;
        case "D":
            if ($action == 'I') {
                $sql = $zthis->DBDate($arrFields[$fname]) . ", ";
            } else {
                $sql .= $fnameq . "=" . $zthis->DBDate($arrFields[$fname]) . ", ";
            }
            break;
        case "T":
            if ($action == 'I') {
                $sql = $zthis->DBTimeStamp($arrFields[$fname]) . ", ";
            } else {
                $sql .= $fnameq . "=" . $zthis->DBTimeStamp($arrFields[$fname]) . ", ";
            }
            break;
        default:
            $val = $arrFields[$fname];
            if (empty($val)) {
                $val = '0';
            }
            if ($action == 'I') {
                $sql .= $val . ", ";
            } else {
                $sql .= $fnameq . "=" . $val . ", ";
            }
            break;
    }
    return $sql;
}
开发者ID:hetznerZA,项目名称:ipplan,代码行数:52,代码来源:adodb-lib.inc.php

示例2: _adodb_column_sql

function _adodb_column_sql(&$zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq, $recurse = true)
{
    if ($recurse) {
        switch ($zthis->dataProvider) {
            case 'postgres':
                if ($type == 'L') {
                    $type = 'C';
                }
                break;
            case 'oci8':
                return _adodb_column_sql_oci8($zthis, $action, $type, $fname, $fnameq, $arrFields, $magicq);
        }
    }
    switch ($type) {
        case "C":
        case "X":
        case 'B':
            $val = $zthis->qstr($arrFields[$fname], $magicq);
            break;
        case "D":
            $val = $zthis->DBDate($arrFields[$fname]);
            break;
        case "T":
            $val = $zthis->DBTimeStamp($arrFields[$fname]);
            break;
        case "N":
            $val = $arrFields[$fname];
            if (!is_numeric($val)) {
                $val = str_replace(',', '.', (double) $val);
            }
            break;
        case "I":
        case "R":
            $val = $arrFields[$fname];
            if (!is_numeric($val)) {
                $val = (int) $val;
            }
            break;
        default:
            $val = str_replace(array("'", " ", "("), "", $arrFields[$fname]);
            // basic sql injection defence
            if (empty($val)) {
                $val = '0';
            }
            break;
    }
    if ($action == 'I') {
        return $val . ", ";
    }
    return $fnameq . "=" . $val . ", ";
}
开发者ID:spring,项目名称:spring-website,代码行数:51,代码来源:adodb-lib.inc.php


注:本文中的_adodb_column_sql_oci8函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。