Sometime on Jan 10, Mark A. Fuller assembled some asciibets to say:
# %db_vals is automatically populated because the prepared statement # has "bind_col" each column to a $db_vals{key}.
if ($db_vals{code} eq $selected_value) { $sel = ' selected="selected"'; }
I do it by pushing the selected evaluation right to the SQL:
SELECT foo, bar, baz, IF(bar='myval', 'selected', '') AS selected FROM ...
and then just throw it into an arrayref.
-- The days are all empty and the nights are unreal.
------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users