Home > php教程 > PHP开发 > body text

Native php mysql link

高洛峰
Release: 2016-11-22 09:54:12
Original
1580 people have browsed it

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;
Copy after login


Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!