fixed empty where conditions for mysql