ASP电子邮件通知 [英] ASP Email Notifications

查看:110
本文介绍了ASP电子邮件通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此方面,我将不胜感激.场景;

我有一个包含以下示例记录的数据库表;

data1 ------------ dt2 ----- data3 ------ data4 -------- data5 ------ data6
酿酒厂----2------10000------11/3/2012---1136-------person1@yahoo.com
酿酒厂----2------10000------11/3/2012---1136-------person1@yahoo.com
汽车厂--------- 1 ------ 5000 ------- 11/3/2012 --- 568 -------- person1@yahoo.com
酿酒厂----1------5000-------11/3/2012---568--------person2@yahoo.com
汽车工厂---------4------20000------11/3/2012---2272------person2@yahoo.com
酿酒厂----3------15000------11/3/2012---1704------person3@yahoo.com

这是我的要求:
我只需要一封通知电子邮件,每封电子邮件都发送给这些人以及他们的信息,例如;

Person1应该收到类似
的电子邮件 Data1 ------------ dt2 --- data5
酿造厂---- 4 ------ 2272
汽车厂--------- 1 ------ 568

而Person2应该会收到类似
的电子邮件 Data1 ------------ dt2 --- data5
酿造厂---- 1 ------ 568
汽车工厂--------- 4 ------ 2272
等等.

我正在使用经典的ASP和mySQL

感谢您的协助.

I''ll appreciate any assistance on this. The scenario;

I have a database table with the following sample records;

data1------------dt2-----data3------data4--------data5------data6
Brewing Plant----2------10000------11/3/2012---1136-------person1@yahoo.com
Brewing Plant----2------10000------11/3/2012---1136-------person1@yahoo.com
Car Plant---------1------5000-------11/3/2012---568--------person1@yahoo.com
Brewing Plant----1------5000-------11/3/2012---568--------person2@yahoo.com
Car Plant---------4------20000------11/3/2012---2272------person2@yahoo.com
Brewing Plant----3------15000------11/3/2012---1704------person3@yahoo.com

This is my requirement:
I want just one notification email each sent to theses various persons with their information, e.g;

Person1 should receive an email like
Data1------------dt2---data5
Brewing Plant----4------2272
Car Plant---------1------568

while Person2 should receive an email like
Data1------------dt2---data5
Brewing Plant----1------568
Car Plant---------4------2272
and so on.

I am using classic ASP and mySQL

Thanks for your anticipated assistance.

推荐答案

SELECT data1, data16, SUM(dt2), MIN(data5)&&MAX(data5)
FROM records
ORDER BY data6 ASC
GROUP BY data6, data1


使用SUM()在特定列中添加所有相同的数据.
另外,请使用MIN()& MAX()用于确定特定列中的最小和最大数据.
ASC用于升序.

希望对您有帮助!
谢谢和问候!


Use SUM() for adding all the same data in specific column.
And also, use MIN() & MAX() for determining the minimum and maximum data in a specific column.
ASC is for ascending order.

Hope this will help you!
Thanks and regards!


这篇关于ASP电子邮件通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆