mysqli error in query method fixed