Re: truncating dilema
| From: | Julie Meloni | Date: | Thu, 13 Jun 2002 21:18:06 +0000 |
| Subject: | Re: truncating dilema | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102070@lists.php.net to get a copy of this message | ||
NW> It has just occured to me though that if I'm to list maybe 100 news
NW> items with descriptions it means alot of memory right because i have 100
NW> items containing:
NW> date
NW> title
NW> text (could be any length)
NW> I will use substr() in my php to format the descriptions but I thought
NW> I'd ask here if anyone had a *better* suggestion?
You could use the substring() function in MySQL (or a similar function
in your db of choice) to make the db do the work instead of PHP.
- Julie
--> Julie Meloni
--> julie@thickbook.com
--> www.thickbook.com
Find "Sams Teach Yourself MySQL in 24 Hours" at
http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20