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

  • SEARCH
  • Home
  • 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 6621235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:14:11+00:00 2026-05-25T21:14:11+00:00

$mysql_connection = new mysqli(blah blah blah.. $query = SELECT * FROM posts ORDER BY

  • 0
$mysql_connection = new mysqli(blah blah blah..
$query = "SELECT * FROM posts ORDER BY id DESC";
$result = $mysql_connection->query($query);

That little last instruction here generates a 500 Internal Server Error in my site, I didn’t posted the whole code because I didn’t want to make you stay hours to read it.
I tested it by printing something after every instruction that may have caused the error, and when it reaches the query part, id stops.

I’m a very beginner in PHP, so sorry if it’s a dumb question.

So, any little hint will be very appreciated.

  • 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-05-25T21:14:12+00:00Added an answer on May 25, 2026 at 9:14 pm

    it looks like the connection is not going through for some reason
    can you add this to your code and post the output

    if ($mysqli->connect_error) {
        die('Connect Error (' . $mysqli->connect_errno . ') '
                . $mysqli->connect_error);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my code: include 'conn.php'; $conn = new Connection(); $query = 'SELECT EmailVerified, Blocked
MySQL connection in PHP can be established in two ways: $mysql = new mysqli('localhost',
I have done this before but am quite new to mysqli and prepared statements
Fatal error: Call to a member function query() on a non-object on line: $result
So here it is ... // I start transaction $mysqli = new mysqli(...); //
We just set up New Relic for monitoring and it says that 90% of
<?php class UBC_DB { private $db; public function connect() { $db = new mysqli('localhost',
I have a simple script which I have included here. the select query works
I am trying to figure out how to put a mysql query result into
[...] public DataSet ReturnPromoMagazinesDs() { MySql.Data.MySqlClient.MySqlConnection mysqlConnection = new MySql.Data.MySqlClient.MySqlConnection(this.connectionString); MySql.Data.MySqlClient.MySqlCommand mysqlCommand = new

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.