You are here: Re: htmlentities and single quote « All PHP « IT news, forums, messages
Re: htmlentities and single quote

Posted by Rik on 01/12/07 17:05

Geoff Berrow wrote:
> Message-ID: <10d86$45a7b5e7$8259c69c$16834@news1.tudelft.nl> from Rik
> contained the following:
>
>>> What would be the best advice for storing HTML data in to a MySQL
>>> database?
>>
>> As HTML data, unedited.
>> Just use mysql_real_escape_string() on it before putting it in the
>> INSERT query.
>
> I had a devil of a job recently trying to store an html file that had
> loads of auto generated JavaScript in it (a crossword puzzle). My
> quick and dirty solution was to save it as a file and then simply
> store
> a reference to it. This is fine if you don't want to do any data
> processing on the content.

If there are reasonably few html snippets/pages it could be OK. Wouldn't
want to try it with 1000+ files though, the filesystem becomes a
bottleneck.

Then again, just simply throwing it though mysql_real_escape_string()
_should_ have done the job without any hassle.
--
Rik Wasmus

 

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

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