[GRLUG] Programming efficiently

Topher topher at wcsg.org
Tue Sep 25 12:18:21 EDT 2007


> A more dynamic approach might be
> <?
>
> $sql="SELECT st_abrv FROM schema.table-with-st_abrv ORDER BY st_abrv;";
>
> So I ask, which would you prefer?

I'd do something similar to three for something like states.  However, 
also for something like states I'd get all the states into an array 
somewhow, whether it be by manually creating it, or generating it with 
your sql call.

Once you have it in an array you can do all sorts of things like make a 
drop list, easily mark one option item "selected", or whatever.

Topher
Manager of Internet Services
Cornerstone University Radio

------
perl -e 'print join "", (map({chr(hex(/usr/bin/pine))} (shift =~ /\w{2}/g))),"\n"' \
4920776973682049206B6E6577204865782E00


More information about the grlug mailing list