Read the documentation:
Returns false on failure. For successful queries which produce a result set, such as SELECT, SHOW, DESCRIBE or EXPLAIN, mysqli_query() will return a mysqli_result object.
Since your query is a
, and the return value is a
, that means your query failed.
Assuming the table and column names are correct, the most likely cause is that you've used a "reserved word" as a column name:
MySQL :: MySQL 8.0 Reference Manual :: 9.3 Keywords and Reserved Words
are all listed as reserved words. You will need to quote the names in order to select them.
SELECT Forward, `Left`, `Right`, Backward, `Stop` FROM mymap