The problem was that I didn't select a db :D
Use methods for determining whether the conn in mysqli