mysql 基础操作
1.连接数据库
mysql_connect ("localhost", "root", "passowrd");
mysql_select_db("database");
mysql_query("set names utf-8");
2.执行一句SQL
$sql = mysql_query("select * from tablename");
mysql_query($sql);
3.拿出数组值
$array = mysql_query("select * from tablename");
while(mysql_fetch_array($array)){}
while(mysql_fetch_array($array)){}