try the PHP function htmlspecialchars()

see the following article:-
http://www.yellowmarker.co.uk/articles/unicode/index.php



----- Original Message -----
From: "Steffen Gebert" <[EMAIL PROTECTED]>
To: "MySQL Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 11:48 AM
Subject: Filtering special-chars


> Hello,
>
> I want to fetch the page via php from a mysql-db, which is called by an
> emulated filename (mod_rewrite, but that might be unimportant).
> So I have a file, which is called by guestbook.html - so I have to find
the entry
> in my db, where the page title is guestbook. But there isn't a only column
for
> this virtual filenames, but only entries like "Guestbook", "This & much
> more..." and so on.
> Becaus I'm not able to use "This & much more..." or thinks like this as
> filenames, I have first have to bring the letters to lower case and then
to filter
> all the special chars. but how can i do this?
>
> because it is for a german cms, I first translate ä,ö,ü,ß
>
> my current solution (whitout replacing special chars) is this:
>
> WHERE
> REPLACE (
>   REPLACE (
>     REPLACE (
>       REPLACE (
>         LOWER( pagetitle ) ,
>       'ö', 'oe'),
>     'ä', 'ae'),
>   'ü','ue'),
> 'ß','ss') LIKE 'guestbook'
>
>
> the column pagetitle has in one entry the value "Guestbook" - but how can
i
> find a entry "This & much more..." - how to delete whitespaces, &, . and
the
> other chars that are not numbers or digits?
>
> doing this at reading from the db has the benefit that I don't have to do
so
> many hacks in the cms as when I would do it at inserting. The problem of
the
> performance might be not so heavy (if I wouldnt have to use much more
> Replace (...)), becaus the cms is just for small pages which are hosted on
> shared hosting servers.
>
> thanx for your help,
> Steffen
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 01/08/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to