本文整理汇总了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;
}
示例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 . ", ";
}