Re: Using mysql_real_escape_string without connecting to mysql
| From: | Dotan Cohen | Date: | Thu, 24 Jan 2008 23:27:29 +0000 |
| Subject: | Re: Using mysql_real_escape_string without connecting to mysql | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-268052@lists.php.net to get a copy of this message | ||
On 25/01/2008, Jim Lucas <lists@cmsws.com> wrote:
> That should be considered part of the DRY method. But spanning page
> requests.
>
> I cannot see any reason why you shouldn't be doing this before you
> insert this information into your DB. Doing it once on your insert,
> instead of every single page request would seen to me a much better use
> of resources.
>
> If you are needing to have the tags in the DB, what I would do is have
> add second column in your DB. One that contains the clean version and
> one that contains the marked up version. Then you are not doing so much
> work on each page load, and you are able to retain the marked up version
> for editing ( i assume )
I will do as you suggest here, as disk space is cheaper than processor
time. Thanks.
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?