return $this->autoincrement;
}
+ public function string() {
+ if ($this->numeric()) return false;
+ if (strpos($this->type,'bool') !== false) return false;
+ return true;
+ }
+
public function numeric() {
return preg_match('/signed|(snall )?int|float|decimal|numeric|number|currency/i',$this->type) ? true : false;
}
public function quote($value,$force_quote=false) {
if ($value === null) return 'NULL';
- if ($force_quote or !$this->numeric()) {
+ if ($force_quote or $this->string()) {
if (!($db = $this->db())) return "'".preg_replace("/'/","\\'",$value)."'";
return $db->quote($value);