Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8714937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:43:33+00:00 2026-06-13T05:43:33+00:00

When I run this Query I recieve Warning: mysqli_fetch_array() expects parameter 1 to be

  • 0

When I run this Query I recieve

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in /home/morgan58/public_html/wow/includes/index/index_admin.php on line 188
SELECT * FROM characters WHERE id=5
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /home/morgan58/public_html/wow/includes/index/index_admin.php on line 194

The Query is running and it is strying to select the correct information, but for on the actual output it’s giving me a fetch_array error; if anyone can see where the error lies it’d be much appreciated. Thank you.

<?php
  $adminid= $admin->get_id();
  $characterdb= 'characters';
$link = mysqli_connect("$server", "$user", "$pass", "$characterdb");
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
$query = "SELECT * FROM characters WHERE id=$adminid";
$result = mysqli_query($link, $query);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
echo $query;
echo $row['name'];
}
mysqli_free_result($result);
mysqli_close($link);
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:43:35+00:00Added an answer on June 13, 2026 at 5:43 am

    There is an error in your query, so mysqli_query() is returning false. Check if it is valid before using it:

    if ($result) {
        /// your code
    }else {
        // your query failed
        die("Error: ".mysqli_error($link)); // will print your error
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I run this query in Toad: SELECT BANDID, BANDNAME FROM WOODSTOCK WHERE BANDNAME
If I try to run this query in SQL Server 2005: SELECT 1 WHERE
Hi I am trying to run this query in SQL but it is not
I am getting an error when I run this query because the data type
I have the following query, now the strange thing is if I run this
I have a custom SQL query that I run with this line: @avg_score =
My scenario is this: I have a base NHibernate query to run of the
Hey guys I am getting this exception when trying to run the query Column
My XML document looks like this When I run XPATH query //collected_objects , I
I'm currently trying to run a LINQ query over a MS SQL database. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.