query("INSERT INTO $table (" . implode(",", array_keys($values)) . ") VALUES (" . implode(",", array_map(array('self', 'quote'), array_values($values))) . ")"); } function update($table, array $values, $cond) { return $this->query("UPDATE $table SET " . implode(",", array_map(array('self', 'assign_quote'), array_keys($values), array_values($values))) . " WHERE $cond"); } function check_text($text) { if(strlen($text) > self::limit) $text = substr($text, 0, self::limit); $text = htmlspecialchars(trim($text)); return $text; } } ?>