public function FrxPDO::quote in Forena Reports 7.5
Wrapper method cause some ODBC providers do not support quoting. We're going to assume the MSSQL method of quoting.
Parameters
$value:
1 call to FrxPDO::quote()
- FrxPDO::format in src/
Driver/ FrxPDO.php - Implement custom SQL formatter to make sure that strings are properly escaped. Ideally we'd replace this with something that handles prepared statements, but it wouldn't work for
File
- src/
Driver/ FrxPDO.php, line 165 - General database engine used to do sql queries.
Class
Namespace
Drupal\forena\DriverCode
public function quote($value) {
$new_value = $this->db
->quote($value);
if (($value !== '' || $value !== NULL) && !$new_value) {
$value = "'" . str_replace("'", "''", $value) . "'";
}
else {
$value = $new_value;
}
return $value;
}