Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
2016-08-16
function delete($table, $where = null) {
$where = $where == null ? null : "where " . $where;
$sql = "delete from $table {$where}";
mysql_query ( $sql );
return mysql_affected_rows ();
}
要刪除管理員那里,我把sql 語句 里$table的括號去掉了就好了
$where = $where == null ? null : "where " . $where;
$sql = "delete from $table {$where}";
mysql_query ( $sql );
return mysql_affected_rows ();
}
要刪除管理員那里,我把sql 語句 里$table的括號去掉了就好了
2016-08-15
其實不用糾結(jié)代碼亂什么的,畢竟不是使用框架,這功能已經(jīng)是非?;A(chǔ)了,相信大家以后也不會使用原生代碼開發(fā)項目吧。
2016-08-14