return $r;
}
+ /**escapes a list of strings; uses escapeInt for each element; automatically adds parentheses*/
+ public function escapeStringList(array $il)
+ {
+ if(count($il)==0)return "(NULL)";
+ $r="(";
+ $b=false;
+ foreach($il as $i){
+ if($b)$r.=",";
+ else $b=true;
+ $r.=$this->escapeString($i);
+ }
+ $r.=")";
+ return $r;
+ }
+
+ /**escapes a list of values for a specific column; uses escapeInt for each element; automatically adds parentheses*/
+ public function escapeListColumn(array $il,$table,$col)
+ {
+ if(count($il)==0)return "(NULL)";
+ $r="(";
+ $b=false;
+ foreach($il as $i){
+ if($b)$r.=",";
+ else $b=true;
+ $r.=$this->escapeColumn($table,$col,$i);
+ }
+ $r.=")";
+ return $r;
+ }
+
/**escapes strings; the default uses addslashes and encloses the value in ''; it is recommended to overwrite this with the proper escaping procedure for the target DB (false and null are translated to NULL)*/
public function escapeString($s)
{