change search sql query