how to make query for mysql that will return if it is an empty table or not?