设为首页 加入收藏

TOP

mysqli_fetch_array() ,mysqli_fetch_assoc()遇到的问题
2019-08-23 00:36:53 】 浏览:16
Tags:mysqli_fetch_array mysqli_fetch_assoc 遇到 问题

该函数每运行一次就会读取一行数据。

$book1_imgnum="select * from book_img limit 12";
$book1_totalimg=mysqli_query($link,$book_imgnum) or exit("query error!");
$row=mysqli_fetch_array($book1_totalimg);
while($row=mysqli_fetch_array($book1_totalimg))
{
array_push($rows,$row);
}
这段代码是从数据表的第二行开始获取数据,只是因为我犯了个错误,
$row=mysqli_fetch_array($book1_totalimg)这行代码是多余的。
这行代码运行了一次,下面在运行就是从第二行开始运行。
 
 
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇PHP的简单跳转提示的实现 下一篇phpstudy 产生You don't have..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目