public function escape($value) {
        if (is_array($value)) {
            $res = '';
            if (count($value) == 0) return 'null';
            foreach($value as $val) {
                $res .= $this->escapeOne($val).',';
            }
            $res = substr($res, 0, -1);
            return $res;
        } else {
            return $this->escapeOne($value);
        }
    }
public function escape($value) {
        if (is_array($value)) {
            $res = '';
            if (count($value) == 0) return 'null';
            foreach($value as $val) {
                $res .= $this->escapeOne($val).',';
            }
            $res = substr($res, 0, -1);
            return $res;
        } else {
            return $this->escapeOne($value);
        }
    }
public function escape ( $ value ) { if ( is_array ( $ value ) ) { $ res = '' ; if ( count ( $ value ) == 0 ) return 'null' ; foreach ( $ value as $ val ) { $ res .= $ this -> escapeOne ( $ val ) . ',' ; } $ res = substr ( $ res , 0 , - 1 ) ; return $ res ; } else { return $ this -> escapeOne ( $ value ) ; } }
Escape values for using in queries

@param mixed $value to be escaped
@return mixed $value  Escaped
Escape values for using in queries