Knowledgebase

Home » Item #824

Listing emails on my mailing list

Item: #824
Date: 24 Mar 2004
Applies to
v5

Question

In the back end where it lists the email addresses that have signed up to the mailing list, it only displays the first 20 addresses.

Is it possible to change this to show more addresses, or to list in reverse order?

Answer

Although this is hard-coded in to the script, with a bit of hacking it's simple make these modifications.

Load up the page _mailinglist_list.asp. On line 34 you should see the SQL query that pulls out the mailing list records:

strQuery = "SELECT * FROM tblCactuShopMailingList WHERE ML_Email LIKE '%" & sqlsafe(strEmailAddress) & "%' AND ML_Email <> '' ORDER BY ML_ID"
If you change the Order By field, you can pull out the most recent changes:
strQuery = "SELECT * FROM tblCactuShopMailingList WHERE ML_Email LIKE '%" & sqlsafe(strEmailAddress) & "%' AND ML_Email <> '' ORDER BY ML_Date DESC"
Down on line 92, it sets how many records to pull out:
do while numBackgroundCounter < 20 AND NOT objRecordSet.EOF
Change this 20 to any figure to pull out that many records.

Can't find the answer you need? Click here to open a support ticket.

« Back