MySQL Forums
Forum List  »  PHP

Re: Error querying database
Posted by: Peter Brawley
Date: April 01, 2016 06:59PM

You need to know what the error is.

Replace ...

or die('Error querying database');

with ...

or exit( mysqli_error($dbc) );

If that doesn't clarify the error for you, add ...

echo $query;

... to the script just before the query call, and paste that query into the mysql client program to investigate what's wrong with the query.

Options: ReplyQuote


Subject
Written By
Posted
April 01, 2016 06:41PM
Re: Error querying database
April 01, 2016 06:59PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.