Home  >  Article  >  php教程  >  Native php mysql link

Native php mysql link

高洛峰
高洛峰Original
2016-11-22 09:54:121590browse

1. Native connection code

   $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 &#39;<pre class="brush:php;toolbar:false">&#39;;
    var_dump($arr);
    exit;


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn