[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Sql in receipt-mail?
Thomas Lang <tcl@physik.kfunigraz.ac.at> writes:
> Is it possible to use sql-queries within the perl code in the receipt
> page (the mail copy of the order!). - It seems MV is first interprating
> its tags then perl and at last the sql - or something like that. So the
> email only contains the [sql-param n] tags - but no values.
It works definitely, it must be an error on your side.
E.g.:
[comment]Get country data[/comment]
[perl arg=values interpolate=1]
$hash=[sql type=hash interpolate=1]select * from country where id = [value newcid][/sql];
foreach $key (keys %$hash) {
$Safe{'values'}->{countrypostcode} = $$hash{$key}->{postcode};
$Safe{'values'}->{countrypostcode} =~ s/\s+$//;
$Safe{'values'}->{countrypostcode} =~ s/^\s+//;
$Safe{'values'}->{countryprefix} = $$hash{$key}->{phoneprefix};
$Safe{'values'}->{countryprefix} =~ s/^\s*0+//;
}
[/perl]
Bye
Racke
--
LinuXia - Solutions of Cool Competence - Internetprogramming and more
D-30163 Hannover, Waldstraße 4, 0511-3941290 (http://www.linuxia.net/)
Wir realisieren Onlineshops mit Minivend (http://www.minivend.com)
und MiniMate (http://www.linuxia.net/minimate/).