我有一个发送电子邮件的 perl test.pl 页面。电子邮件包含指向 html 页面 linkfromTest.html 的链接。
(Interchange 是 Interchange Development Group 提供的用 Perl 编写的基于 Web 的应用程序框架。主页: http: //www.icdevgroup.org/i/dev)
但是我必须使用来自 test.pl '$ref->{'outofstock_prod'}' 的 sql 查询的结果在 linkfromTest.html 页面中需要运行 sql 查询。
test.pl
$sql = "select OS.id,OS.name,OS.date,OS.customer_email,OS.product as outofstock_prod,OS.salesperson_email,OS.salesperson
from outofstock_sku as OS
where mail_sent='0'
order by OS.id";
$ref->{'outofstock_prod'}
......
......
print MAIL "More items potentially matched.\n\n";
print MAIL "Click here to view more items : http://qqq.qqqq.com/linkfromTest.html\n\n";
.....
linkfromTest.html
[query list=1 sql="select P.sku,P.manufacturer,P.category,P.scat,P.description,P.imgid
from
products AS P LEFT JOIN inventory AS I
ON (I.sku = P.sku AND I.status = 'A')
WHERE P.manufacturer LIKE '$ref->{'outofstock_prod'}''
LIMIT 0,4;"]
提前致谢