db->query(SELECT) to db->select()