You are here: mySQL loop and string operation « PHP Language « IT news, forums, messages
mySQL loop and string operation

Posted by Simon Harris on 02/04/07 08:07

Hi All,

I have a page which loops through many database records, running a string
function to strip HTML (Using RegEx/preg_replace). I am concerned that over
time, this is going to become very slow.

Few ideas I had:

a) Cache the HTML free version of the text in the DB, updating/creating each
records text when the page is loaded, based on the updated date of the
record.
b) Is there a faster way to strip the HTML? Could I do this on-the-fly at
mySQL level?
c) In ASP ( My native language! :-) ) I can load the results into an array,
then loop the array which is quicker. Can this be done in PHP?

Any ideas much appreciated.

Simon.


--
--
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 3476 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация