* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.75 2003/04/18 08:34:41 chriskl Exp $
+ * $Id: Postgres.php,v 1.76 2003/04/20 09:53:52 chriskl Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
* @return The cleaned string
*/
function clean(&$str) {
+ if ($str === null) return null;
if (function_exists('pg_escape_string'))
$str = pg_escape_string($str);
else
* @return The cleaned string
*/
function fieldClean(&$str) {
+ if ($str === null) return null;
$str = str_replace('"', '""', $str);
return $str;
}
*/
function arrayClean(&$arr) {
foreach ($arr as $k => $v) {
+ if ($v === null) continue;
if (function_exists('pg_escape_string'))
$arr[$k] = pg_escape_string($v);
else
*/
function fieldArrayClean(&$arr) {
foreach ($arr as $k => $v) {
+ if ($v === null) continue;
$arr[$k] = str_replace('"', '""', $v);
}
return $arr;