SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ASP Email Notifications

    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.

  2. #2
    SitePoint Zealot gidday's Avatar
    Join Date
    Jan 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi walebel

    You need to help us with some code first. I/we don't write it for you. We help you.
    Joe
    "All that is necessary for the triumph of evil
    is that good men do nothing."

  3. #3
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is the query I am using

    SELECT data1, sum(dt2) as dt2, sum(data5) as data5 from table1 WHERE DATE_FORMAT(data4, '%m %d') = DATE_FORMAT('2012-11-03', '%m %d') and data6 = person1a at yahoo.com GROUP BY data1

    I get the following result

    Data1--------------dt2---data5-----data6
    Brewing Plant-----4-----568-------person1 at yahoo.com
    Car Plant-----------1-----2272------person1 at yahoo.com

    With this I have to send 2 emails to the same recipient, but I'd like to send just one email containing these information, i.e, I need a query that will result into just 1 email address with the corresponding details, e.g

    data6 - person1 at yahoo.com
    Data1---------------dt2---data5
    Brewing Plant-----4-----568
    Car Plant-----------1-----2272

  4. #4
    SitePoint Enthusiast
    Join Date
    Aug 2011
    Location
    OH, USA
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you ned help with sql or with asp? I do not see any asp code there

  5. #5
    SitePoint Member
    Join Date
    Nov 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just realized I actually need help with MySql, thanks

    Quote Originally Posted by gk53 View Post
    Do you ned help with sql or with asp? I do not see any asp code there


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •