PHP error- Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given

If you get the above or similar error messages with a function of mysql_* then you need to update your website code.
mysql is no longer supported due to security reasons, you need to use mysqli or PDO for this. You can use prepared statements for this.

To learn more about the techniques recommended above you can consult the following link .

If you still get similar error messages after that then you can check the query. To apply this you can run the following:


https://php.net/manual/en/mysqli.error.phpkeywords:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given