Home > php教程 > php手册 > PHP5 连接mysql数据类

PHP5 连接mysql数据类

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:38:48
Original
856 people have browsed it

@ $db = new mysqli_connect(主机,用户名,密码,数据库名); //连接数据库

$sql = "";

$result = $db->query($sql);         //执行sql语句

$num_results = $result->unm_rows;   //返回行数

$row = $result->fetch_row($result); //取出一行数据 或用

$row = $result->object();   //将一行数据返回到一个对象里 例如 $row->title 
  • 来源: 编程之家
  • 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