protected function _prepareValue($type, $value) { if (is_null($value)) { return "NULL"; } if (substr($type, 0, 3) == 'int') { return (int) $value; } return "\"" . $this->_db->esc($value) . "\""; // TODO : do escaping/formating for dates }