At 1:50 -0800 1/28/02, Andrei B. wrote:
>Is there a function for URL encoding a value ?
>
>Here's what I mean :
>
>select x from y
>returns 'word1 word2 %word3'
>If I were to put this into a URL, some browsers will not handle the URL
>correctly, especially at the space character, also the same happens
>with some proxy servers (like squid at least 2.3)
>
>I would like to do the following :
>
>select URL(x) from y
>and see the result : 'word1%20word2%20%27word3'
>
>which I can safely put into a link and will be handled correctly by all
>browsers and proxies.
>
>I would like it to be a SQL server function because I use a very
>generic
>CGI script for which the queries are completely controled by form
>parameters. I cannot URL encode all returned values, also I can't
>select a certain field and encde it without losing much of the generic
>characteristic of the script.

I'm not sure that makes sense.  You have to be able to tell at *some*
level which values are to be url-encoded.  Given that, it may not matter
much whether it's done by the MySQL server, or by your script.

However, given that your scripting language probably already has a function
to do that, and MySQL does not, the quicker solution is the use your scripting
language.

But you didn't indicate what language you're using, so we can't answer the
question for you.

>=====
>ing. Andrei Boros
>Centrul pt. Tehnologia Informatiei
>Societatea Romana de Radiodifuziune


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to