public function FrxPostgres::format in Forena Reports 7
Same name and namespace in other branches
- 6.2 plugins/FrxPostgres.inc \FrxPostgres::format()
- 6 plugins/FrxPostgres.inc \FrxPostgres::format()
- 7.2 plugins/FrxPostgres.inc \FrxPostgres::format()
- 7.3 plugins/FrxPostgres.inc \FrxPostgres::format()
- 7.4 plugins/FrxPostgres.inc \FrxPostgres::format()
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
Parameters
unknown_type $value:
unknown_type $key:
unknown_type $data:
File
- plugins/
FrxPostgres.inc, line 137 - Oracle specific driver that takes advantage of oracles native XML support
Class
- FrxPostgres
- @file Oracle specific driver that takes advantage of oracles native XML support
Code
public function format($value, $key, $data) {
if ($value == '') {
$value = 'NULL';
}
else {
$value = "'" . pg_escape_string($value) . "'";
}
return $value;
}