|
-
Dec 18th, 2006, 11:35 AM
#1
Thread Starter
Frenzied Member
sending data into an email
Is there a way to do a query, and put the results into a pre automated message, or dump it into an excel spreed sheet?
I wanted to have 2 options, 1 that says "email query" or "download" query, so they can select either or, and it will do wha they selected.
something like:
to: [email protected]
subject: "overdue pos"
body:
Your query?
-
Dec 18th, 2006, 02:09 PM
#2
Re: sending data into an email
I don't understand what you're trying to do.
you want to email them an SQL query? email the results? or create an excel spread sheet of the results?
if you want to email the results of a query you can do that just by querying the database and looping stuff through. you could either put it all in HTML or all in plain text. if you did it with HTML, the people who would be receiving it would need to have an email client that supported HTML, otherwise it would be useless.. so I guess you could have the option for HTML or plain text, too. you just have to store it in a variable and then add it to the body of the mail() call..
I can't help you with exporting to Excel, and don't feel like looking around for where to even start. try Googling PHP exporting to Excel, or something like that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|