Call fetch_assoc on boolean
If you get an error like this:
Other variations include something along the lines of:
These errors mean that there is something wrong with either your query (this is a PHP/MySQL error), or your referencing. The above error was produced by the following code:
In order to "fix" this error, it is recommended to make mysql throw exceptions instead:
This will then throw an exception with this much more helpful message instead:
Another example that would produce a similar error, is where you simply just gave the wrong information to the
mysql_fetch_assoc function or similar:
If you get an error like this (or sometimes
unexpected $end, depending on PHP version), you will need to make sure that you've matched up all inverted commas, all parentheses, all curly braces, all brackets, etc.
The following code produced the above error:
Notice the missing curly brace. Also do note that the line number shown for this error is irrelevant - it always shows the last line of your document.