if($chr == '"') {
$out .= '"' . enc_sql(array_pop($args)) . '"';
+ } elseif($chr == 's') {
+ $out .= enc_sql(array_pop($args));
} elseif($chr == 'i') {
$int = format_int(array_pop($args));
if($int == '') $int = '0';
return $value;
}
+function db_count($table, $where = '') {
+ return db_get_value($table, 'count(*)', $where);
+}
+
# call either of these ways:
#
# db_insert('people', 'name,company', 'jason', 'widgets ltd');