how i can search in multible layer using find task in using where because i have more than one parameter to spcify the correct record i want somthing like query.where ="cityname = ca and year_id= 2010 and id=9" and the search will be in layer 0 and 1
Because in the majority of cases the data schemas of the layers are different a query can be only defined and valid for that specific data source/attribute table/feature class/layer. So the "Query" operation works only for one layer at once. A "Find" operation is implemented different and therefore works on multiple layers of one service; it's an operation of the service-endpoint whereas the query is an operation on a layers-endpoint.
To query multiple layers you have to place your query on each layer, specifiy the return fields and combine the results in your application-view.