Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Fatal error: Uncaught TypeError: mysqli_fetch_all(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\Tutorial\task\showDetails.php:15 Stack trace: #0 C:\xampp\htdocs\Tutorial\task\showDetails.php(15): mysqli_fetch_all(false, 1) #1 {main} thrown in C:\xampp\htdocs\Tutorial\task\showDetails.php on line 15


What I have tried:

$user_details = mysqli_fetch_all($result, MYSQLI_ASSOC) ;
Posted
Updated 20-Feb-23 0:13am
Comments
Dave Kreskowiak 20-Feb-23 9:09am    
Without you posting the code that setup and executed the SQL query, it's impossible for anyone to tell you what you did wrong.

The "Improve question" button is there for a reason.

1 solution

Read the documentation, or any of the dozens upon dozens of questions where this error message has been posted:
Returns false on failure.
Your query has failed. You need to debug your code to find out why.

We can't do that for you. We don't have access to your database, and you haven't shown any of your code.

One common cause is if you've written code which is vulnerable to SQL Injection:
PHP: SQL Injection - Manual[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900