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[
^]