diff options
-rw-r--r-- | it_dbi.class | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/it_dbi.class b/it_dbi.class index 2923bf3..d864a1a 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -915,26 +915,6 @@ function escape_string($str) } /** - * Escapes an int for use in a DB query - * @param The int to be quoted - * @return The quoted value - */ -static function escape_int($val) -{ - return "'" . intval($val) . "'"; -} - -/** - * Escapes a float for use in a DB query - * @param The float to be quoted - * @return The quoted value - */ -static function escape_float($val) -{ - return "'" . floatval($val) . "'"; -} - -/** * Escapes a name/identifier for use in a DB query * @param The identifier to be quoted * @return The quoted value @@ -976,15 +956,9 @@ function _get_field_info() $this->_escapefunc[$name] = $field['_escapefunc']; } else if (preg_match('/^(tiny|small|medium|)int/', $field['Type'])) - { - $this->_convertfunc[$name] = "intval"; - $this->_escapefunc[$name] = static::class . "::escape_int"; - } + $this->_convertfunc[$name] = $this->_escapefunc[$name] = 'intval'; else if (preg_match('/^float|^double$/', $field['Type'])) - { - $this->_convertfunc[$name] = "floatval"; - $this->_escapefunc[$name] = static::class . "::escape_float"; - } + $this->_convertfunc[$name] = $this->_escapefunc[$name] = 'floatval'; } $this->_fieldnames = "," . implode(",", array_keys((array)$this->_fields)) . ","; |