Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15710

Re: rawurlencode problem

From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: rawurlencode problem
Date 2015-10-20 07:10 +0200
Message-ID <d8m0lvF49nbU1@mid.individual.net> (permalink)
References <d8kekpFmk8uU1@mid.individual.net> <d8kuhsFr019U1@mid.individual.net> <d8kveuFr6aqU1@mid.individual.net>

Show all headers | View raw


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.

> What's that got to do with the question I asked?

Have you thought of using id as the value, you can always make a new
request to the database to get the name in an unmodified by the user.
You can also check that the is_int() when you get the value posted back
to see if it's possibly a valid value.

-- 

 //Aho

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-19 14:56 +0000
  Re: rawurlencode problem Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-10-19 17:18 +0200
    Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-19 15:48 +0000
      Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-20 00:02 +0200
        Re: rawurlencode problem Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-10-21 09:40 +0200
    Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 18:33 +0200
  Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-19 21:27 +0200
    Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-19 19:43 +0000
      Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-20 00:03 +0200
      Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 07:10 +0200
        Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 07:21 +0200
          Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-20 08:29 +0000
            Re: rawurlencode problem "J.O. Aho" <user@example.net> - 2015-10-20 18:29 +0200
        Re: rawurlencode problem Arno Welzel <usenet@arnowelzel.de> - 2015-10-27 14:01 +0100
          Re: rawurlencode problem Arno Welzel <usenet@arnowelzel.de> - 2015-10-27 14:04 +0100
  Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-20 00:00 +0200
  Re: rawurlencode problem Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-19 19:35 -0400
    Re: rawurlencode problem Derek Turner <frderek@suremail.je> - 2015-10-20 08:34 +0000
      Re: rawurlencode problem Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-21 13:54 +0200

csiph-web