Re: Question about storing text and data types.

From: Date: Thu, 23 Nov 2000 06:56:43 +0000
Subject: Re: Question about storing text and data types.
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-26801@lists.php.net to get a copy of this message
On Thu, 23 Nov 2000, Cybercandy wrote: > Hi, > > I'm trying to produce a script which takes up an incoming email from stdin > and saves it > to a mysql db amongst other things. > > I've tried using a BLOB field to store the email body but for some reason > this seems to only accept an emaily body up to a certain length (quite small > maybe 250 chars) before it crashes my script. > > Am I using the right data type with BLOB or should I be using something > else? No incoming email would be more than 2000 - 3000 characters. When I > tried changing the datatype to > LONGBLOB my script stopped working at all. > > The other side issue from this is I'm working completely blind because I, > obviously don't get error messages, how can I get my script to email me > error messages (like parsing errors etc)? > > I've found the mysql documentation not as friendly as the php documentation > any pointers on some simple tutorials would be great. > > Any pointers on these issues would be appreciated. > > Thanks for everyone's help on my previous questions. > > Allan Goacher You might consider using text rather than blob. For error messages, perhaps you could explore the possibility of checking the value of mysql_errno() and using that to trigger a mail message that contains the output of mysql_error(). That would at least get you any mysql errors. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#26801) next »