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:04:03 +0100 Lines: 51 Message-ID: <562F7643.1000508@arnowelzel.de> References: <562F75B2.8060209@arnowelzel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net f4TXAlyEQgq2dgHQyT2NVQ6k95SHl8bbAHEQP1RtY0e2MP47/u Cancel-Lock: sha1:34MJ1Xv0vrQHfU3VgpU5plj9bBo= In-Reply-To: <562F75B2.8060209@arnowelzel.de> Xref: csiph.com comp.lang.php:15794 Arno Welzel schrieb am 2015-10-27 um 14:01: > 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

Of course not "1" but "l1" or similar (starting with an alpha character since numbers are not valid as IDs. > The title can be created using htmlspecialchars() > > Also see here: > > -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de