AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL

mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given - warning



I have this error mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given - how to solve it?

Example 1: IN operator Syntax
<?php
$sql="SELECT * FROM customers WHERE id=".$id."";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)) {

$first_name = $row["first_name"];
$last_name = $row["last_name"];
$email = $row["email"];
$password = $row["password"];

echo "id: " . $row["id"]. " - Name: " . $row["first_name"]. " " . $row["last_name"]. "<br>";
}
?>
I've read it has something to do with my query being wrong, but it has worked on my hosting provider so that can't be it!



mysqli_fetch_array
Mysqli_fetch_array() expects parameter 1 to be mysqli_result boolean given - php mysqli

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


0
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


CSS background color - opacity, gradient...
CSS flex - display: flex - CSS Flexbox L...
CSS border padding...
HTML text center horizontally and vertic...
HTML text input <input type="text"&g...
HTML link color...
How to Link CSS to HTML, external file n...
HTML link - hyperlink...
jQuery replace...
jQuery replaceClass...
jQuery click ()...
jQuery switchClass()...
jQuery draggable()...
jQuery HTML...
jQuery scroll smooth...
jQuery scroll()...
jQuery stop()...
jQuery animate()...
jQuery SlideToggle()...
jQuery slideDown()...