+ Reply to Thread
Results 1 to 4 of 4

Thread: Exporting Customer emails

  1. #1
    Client
    Join Date
    Feb 2006
    Posts
    53
    Squirrelcart version
    v3.3.1

    Exporting Customer emails

    Is there a way to take the names and emails of the customers in the News address book or Specials address book and export it to a cvs file or tab delimited text file?
    robert
    mendocinomaples.com

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    You would have to use phpMyAdmin to export to a CSV file.

    1. Find the record_number of the group you want the addresses for

    2. Open phpMyAdmin

    3. Click the SQL tab

    4. Past this query into the query box:
    Code:
    SELECT
         CONCAT(c.`First_Name`,' ',c.`Last_Name`) AS `Name`
        ,c.`Email_Address`
    FROM
        `Customers` c
    LEFT JOIN
        `REL_Customers__Groups` cg
    ON
        cg.`Customers_rn` = c.`record_number`
    WHERE
        cg.`Groups_rn` = 15
    GROUP BY
        c.`record_number`
    5. Change the 15 at the end to match the group's record_number

    6. Click Go

    7. You should now have the data you want

    8. Scroll down and click the Export link
    example1.png

    9. Choose the file format and click Go

  3. #3
    Client
    Join Date
    Dec 2004
    Location
    Phoenix, AZ
    Posts
    337
    Squirrelcart version
    v3.3.2
    would it be possible to use a simple database query to generate a list of email addresses that belong to a certain group and display them on the screen...allowing for a copy/paste into a text file?

  4. #4
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Change the 3 to the group number you want members of:
    Code:
    SELECT
        DISTINCT c.`Email_Address`
    FROM
        `REL_Customers__Groups` cg
    LEFT JOIN
        `Customers` c
    ON
        cg.`Customers_rn` = c.`record_number`
    WHERE
        cg.`Groups_rn` = 3
        AND c.`Email_Address` IS NOT NULL
    ORDER BY
        c.`Email_Address`

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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