Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: rawurlencode problem Date: Tue, 27 Oct 2015 14:01:38 +0100 Lines: 46 Message-ID: <562F75B2.8060209@arnowelzel.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net RHKYEMNC/C8MB9BXYdOjLwH0z0adYWdZc66eeb3wlnApnzN5Dd Cancel-Lock: sha1:CDfZp38jOG1TBd95GsrlGySy9+A= In-Reply-To: Xref: csiph.com comp.lang.php:15793 J.O. Aho schrieb am 2015-10-20 um 07:10: > On 10/19/2015 09:43 PM, Derek Turner wrote: >> On Mon, 19 Oct 2015 21:27:54 +0200, J.O. Aho wrote: >> >>> The standard is to use a numeric id in the database, it's a lot easier >>> to validate that it seems to be okey and numeric index in the database >>> is faster than varchar/text based. >>> >>> I would recommend a redesign of your database and it will solve your >>> problem too. >> >> I really don't see how that even begins to answer my question. There is, >> of course, an auto-incrementing integer primary key in all four tables. > > That wasn't in your example and your use of the "name" gave the > impression your database could be flawed. The name was used to create a link to another section *within* the same document: Some Name

Some Name

I would also advise to use the numerical IDs from the database for this purpose and use title attributes in the links for the description: Some Name

Some Name

The title can be created using htmlspecialchars() Also see here: -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de