[thelist] Retrieving info from db to ASPMail

Flavia Silveira-Tarzwell (FayeC) fayec at canada.com
Tue Jul 24 17:50:56 CDT 2001


Hi,

I am having difficulty finding the right way to retrieve information
from two tables to insert them on an email to be sent to the site's
owner.
i.e. Someone buys a t-shirt. An email is sent to the store's owner with
the full info on the buyer (from table 'users') and the info on the
order (from table 'orders').
I was able to retrieve info from the 'users' table but when I try using
the variables from table 'orders' I get an error with the 'quantity' 
and the productID, although doesn't cause any errors, won't show on the
email.
Do I need to specify the table where each variable is coming from? I
tried using 'orders_quantity', 'orders_productID' but it doesn't work.
The sendmail code I am using is as follows:
<% 
Dim sendmail
Set sendmail = CreateObject("CDONTS.NewMail")
sendmail.to = "admin at magazine.com"
sendmail.from = "orders at magazine.com"
'sendmail.cc = ""
'sendmail.bcc = ""
sendmail.subject = "Order Placed"
sendmail.body = "The following user placed an order: " & vbcrlf & "Name:
" & firstname & lastname  & vbcrlf & "Address: " & street & vbcrlf &
"City: " & city & vbcrlf & "Province: "  & province & vbcrlf & "Postal
code: " & postalcode & vbcrlf & "And he placed the following order: "&
vbcrlf & "Product: " & productID & vbcrlf & "Quantity: " & quantity &
vbcrlf & "Date: " & now()
sendmail.send
Set sendmail = nothing
%>

Any help will be extremely appreciated,


-- 
Flavia Tarzwell (FayeC)
Web Designer/Developer




More information about the thelist mailing list