為啥說我語法錯(cuò)誤吖
<?php
//連接數(shù)據(jù)庫
mysql_connect('127.0.0.1', 'code1', '');
mysql_select_db('code1');
mysql_query("set names 'utf8'");
//數(shù)據(jù)預(yù)處理 防止查詢不到數(shù)據(jù)
mysql_query("insert into user(name, age, class) values('王二', 19, '高三五班')");
//進(jìn)行數(shù)據(jù)查詢
$sql = "select * from user limit 1";
$result = mysql_query($sql);
//在這里獲取一行數(shù)據(jù)
$row = mysql_fetch_array($result);
echo '<pre>';
print_r($row);
echo '</pre>';
2019-11-20
應(yīng)該是服務(wù)器上沒有這個(gè)數(shù)據(jù)庫