本文整理汇总了PHP中ew_GetConnectionType函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_GetConnectionType函数的具体用法?PHP ew_GetConnectionType怎么用?PHP ew_GetConnectionType使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ew_GetConnectionType函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LoadRecordset
function LoadRecordset($offset = -1, $rowcnt = -1)
{
// Load List page SQL
$sSql = $this->SelectSQL();
$conn =& $this->Connection();
// Load recordset
$dbtype = ew_GetConnectionType($this->DBID);
if ($this->UseSelectLimit) {
$conn->raiseErrorFn = $GLOBALS["EW_ERROR_FN"];
if ($dbtype == "MSSQL") {
$rs = $conn->SelectLimit($sSql, $rowcnt, $offset, array("_hasOrderBy" => trim($this->getOrderBy()) || trim($this->getSessionOrderBy())));
} else {
$rs = $conn->SelectLimit($sSql, $rowcnt, $offset);
}
$conn->raiseErrorFn = '';
} else {
$rs = ew_LoadRecordset($sSql, $conn);
}
// Call Recordset Selected event
$this->Recordset_Selected($rs);
return $rs;
}
示例2: ew_AdjustSql
function ew_AdjustSql($val, $dbid = 0)
{
$dbtype = ew_GetConnectionType($dbid);
if ($dbtype == "MYSQL") {
$val = addslashes(trim($val));
} else {
$val = str_replace("'", "''", trim($val));
// Adjust for single quote
}
return $val;
}