When I run the following code, I get the error saying
Fatal error: Uncaught exception \'mysqli_sql_exception\' with message \'No index used in que
Take a look at this bug-report : #35450 mysqli extension reports too many warnings
Quoting a few sentences of a note :
Mysqli extension throws too many warnings.
For example, "SELECT * FROM table" results in a warning: "Warning: mysqli::query(): No index used in query/prepared statement SELECT * FROM table ..."
And, quoting another note, which seems interesting :
Use
mysqli_report()
to disable that.