On Jan 18, 2006, at 1:13 AM, Ulrich Stärk wrote:
3) You should use placeholders in the SQL. (As it is it'll break if
someone sends a mail with ' in the subject).
That's what myquote() is for. It will quote all "'" and "\" in a given
string. And $subject is quoted that way. [...]
Ah, I missed that. DBI has a quote method you could use instead.
4) Why store the mail both in the database and in a file?
Because you don't want all the attachments in your database but you do
want to search the message body. That's the reason why [...]
Ok, I thought you were saving the attachment in the database too.
By the way that's the way almost all archive systems are designed.
Store
metadata and things you like to search in a database and put the real
content on hard disk/NAS/optical media.
I've found that a lot of my assumptions like that have been changing
over the years as hardware and database systems have evolved. But
that's a talk for another mailing list.
- ask
--
http://www.askbjoernhansen.com/