mysql|示例|数据|数据库
$conn= mysql_connect('localhost','root','123456') or die('connect error:'.mysql_error());
mysql_select_db('netDuzhe');
$result=Mysql_query('select * from article');
while ($row = mysql_Fetch_array($result, MYSQL_BOTH)) {
printf ("ID: %s Name: %s content:%s", $row[0], $row[1],$row[2]);
}
mysql_free_Result($Result);
?>
注意点