使用PHP调用Smarty显示时 HTML模板当中的css没有显示布局改变 有方法解决么 直接打开HTML就能正常显示
2017-05-14
// 记录的删除操作
function delete($table, $where = null) {
$where = ($where == null)? null : " where " . $where;
$sql = "delete from {$table} {$where}";
mysql_query($sql);
return mysql_affected_rows();
}
function delete($table, $where = null) {
$where = ($where == null)? null : " where " . $where;
$sql = "delete from {$table} {$where}";
mysql_query($sql);
return mysql_affected_rows();
}
2017-05-11
// 完成记录的插入操作
function insert($table, $array) {
$keys = join(",", array_keys($array));
$vals = "'" . join("','", array_values($array)) . "'";
$sql = "insert {$table}($keys) values({$vals})";
mysql_query($sql);
return mysql_insert_id();
}
function insert($table, $array) {
$keys = join(",", array_keys($array));
$vals = "'" . join("','", array_values($array)) . "'";
$sql = "insert {$table}($keys) values({$vals})";
mysql_query($sql);
return mysql_insert_id();
}
2017-05-11