原生php mysql链接
程序员文章站
2022-05-28 09:09:55
...
1.原生连接代码
$test = "SELECT count(*) count from dede_userphone where phone=".$mobile; $coon = @mysql_connect('$host','$user','$password'); @mysql_query("SET NAMES UTF8"); @mysql_select_db('dede_qizheng',$coon); $res = @mysql_query($test,$coon); while($re = mysql_fetch_array($res)) { array_push($arr,$re); } echo '<pre>'; var_dump($arr); exit;