I am very confused about the Line 31, where clause is like below (ESRI JS API sample code):
The one that is used on Line 31 -- query.text = dom.byId("stateName").value;
My quesion is: how can it know the ("stateName").value is compared to STATE_NAME, not other variable?
Second question is that: I would like to use --- query.where ="STATE_NAME = stateName.value"; but it does not work at all;
I know it should be: query.where ="STATE_NAME = '" + dom.byId ("stateName.value") + "'";
But why the clause should be like that?
Another question is what should I go to study the grammar of query.where clause? SQL? The statement like below is too confusing:
query.where = "POP04 > " + population;
query.where = "NAME = '" + stateName + "'";