> [% FOREACH logentry = DBI.query("SELECT * FROM altpower_battery_log_tb
>                                       WHERE  (project_code = "[%
item_code %]" 
>                                               )
>                                   ")%]    

You can't embed TT tags inside each other like that. What you want is to
interpolate a variable into your double-quoted string, like so:

[% FOREACH logentry = DBI.query("SELECT * FROM altpower_battery_log_tb
                                        WHERE  (project_code =
$item_code
                                                )
                                    ")%]    

This can actually be done without putting the field value into a
temporary value, like this:

[% FOREACH logentry = DBI.query("SELECT * FROM altpower_battery_log_tb
                                        WHERE  (project_code =
${item.item_code}
                                                )
                                    ")%]    

Hope that helps!

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to