hamidafshar has asked for the wisdom of the Perl Monks concerning the following question:
[% FOREACH adds IN DBI.prepare('SELECT * FROM contacts WHERE account_c +ode = [% row.account_code %] AND pref_cont != 0') %] <option value='[% adds.contact_id %]'>[% adds.contact_address1 %]</opt +ion> [% END %]
This code is not working because I am using [% row.account_code %] in the query. [% row.account_code %] carries the value; "M0014400".
If I type "M0014400" manually in the query it will work and everything is fine. But I don't want that. I want to be able to use a variable like I have put in the above query. How do I do it so that it works. Please Help!!!
|
|---|