我似乎无法找到问题, [英] i cant seem to find the issue,

查看:70
本文介绍了我似乎无法找到问题,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

警告:mysqli_fetch_array()要求参数1为mysqli_result,布尔值在第144行的C:\ Users \Administrator \Desktop \ xamp \htdocs \ index.php中给出





//加载最新消息

$ query = mysqli_query($ con,SELECT * FROM news ORDER BY id DESC LIMIT 0 ,1);

$ result = mysqli_fetch_array($ query); < -line 144

$ postAuthor = $ result ['author'];

$ postDate = $ result ['date'];

$ postType = $ result ['type'];

$ postTitle = $ result ['title'];

$ postContent = $ result ['content'];

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\Users\Administrator\Desktop\xamp\htdocs\index.php on line 144


//Load Most Recent News
$query = mysqli_query($con,"SELECT * FROM news ORDER BY id DESC LIMIT 0,1");
$result = mysqli_fetch_array($query); <-line 144
$postAuthor = $result['author'];
$postDate = $result['date'];
$postType = $result['type'];
$postTitle = $result['title'];
$postContent = $result['content'];

推荐答案

query = mysqli_query(
query = mysqli_query(


con,SELECT * FROM news ORDER BY id DESC LIMIT 0,1);
con,"SELECT * FROM news ORDER BY id DESC LIMIT 0,1");


result = mysqli_fetch_array(
result = mysqli_fetch_array(


这篇关于我似乎无法找到问题,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆