我似乎无法找到问题, [英] i cant seem to find the issue,
问题描述
警告: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屋!