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; }
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; }