need to clear/turn off layer after query done

Discussion created by yatie on Jun 24, 2010
Latest reply on Jul 5, 2010 by yatie

I am using arcgis api 1.6. My task is to show a layer when a query is done. For example, query attribute for 'tarikh=1' in layer 0, then the result show/turn on the layer for the exact attribute. next, query for 'tarikh=2' in layer 0, how do i turn off result from tarikh=1 and turn on result from tarikh=2.
Can someone give me the code for this?