I'm writing a class in PHP for handling MySQLI queries, and when the query manages not to return a result set (or object) I want to issue a helpful error message. But, of course, not all queries are designed to return a result set (e.g. ALTER), so I want to filter out those queries that don't.
By my reckoning, the queries that may or may not return a result set are:
- SELECT
- SHOW
- CREATE VIEW
...and all others (e.g. ALTER) do NOT return a result. But have I overlooked something? What are the query commands that never return a result, and what are the query commands that may or may not return a result?
Many thanks!