0

I am switching to AWS RDS Aurora(MySQL) for my database and I have got it all up and running. I imported all my tables and I am able to connect to it using Mysql Workbench.

After pointing my PHP Mysqli Connection I am getting an error

Fatal error: Uncaught Error: Call to a member function fetch_row() on boolean

I am not sure if this new version of MySQL doesn't like the syntax or am I missing something?

tadman
  • 208,517
  • 23
  • 234
  • 262
Cesar Bielich
  • 4,754
  • 9
  • 39
  • 81
  • 1
    Without seeing your code I can't advise precisely, but it appears you are trying to call `.fetch_row()` on an object that isn't a result set. Please show the relevant code. – Nathan Hawks Jan 08 '20 at 20:40
  • 3
    `fetch_row()` is operating on a boolean because the execution of the query that was supposed to produce a resultset encountered an error. The problem (as I see it) is that the code assumes that nothing will ever go wrong with the query execution (e.g. insufficient privileges, invalid identifier, bad syntax, et al.) What you are missing is a check in the code that inspects the return from the query execution; if it is FALSE, then something went wrong, and the code can use `mysqli_error` function https://www.php.net/manual/en/mysqli.error.php to retrieve the error text. – spencer7593 Jan 08 '20 at 20:53
  • Does this answer your question? [mysqli\_fetch\_assoc() expects parameter / Call to a member function bind\_param() errors. How to get the actual mysql error and fix it?](https://stackoverflow.com/questions/22662488/mysqli-fetch-assoc-expects-parameter-call-to-a-member-function-bind-param) – Dharman Jan 08 '20 at 23:16
  • 1
    It's likely that you are using some SQL syntax that Aurora does not support, and your query failed. You should always check for error conditions after every call to `query()`, `prepare()`, and `execute()`. – Bill Karwin Jan 08 '20 at 23:29

0 Answers0