fix query to fetch mno ids for mysqli driver