I have a table that is structured like this
var_code fips_code pop1969 pop1970
1010 01000 111 222
1011 01000 22 11
1012 01000 23 25
1013 01000 .26 .22
I have a dropdown listbox in which the user selects years on a previous page. So assuming that selection is 1969 and is called $yr_ch ---
How on this page can I write my sql statement to pick only the values under 1969?
The table is too large to put all the years under one column called years.
I need to build an sql statement depending on the choices the user makes.
e.g. the user picks 1969
select from tbl_pop pop_1969;