Re: Escaping &
| From: | David Bullock | Date: | Fri, 13 Jul 2001 00:16:13 +0000 |
| Subject: | Re: Escaping & | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-10364@lists.php.net to get a copy of this message | ||
On Thu, 12 Jul 2001 10:18:23 -0500, randy.rankin@invensys.com (Randy Rankin)
wrote:
>Hello,
>
>I have a table in a MySQL DB (RH Linux/Apache) with a field called
>customer_name. Some of the customer names have an ampersand in them (ie; X &
>X Supply). I am performing a select statement on this table to create a
>sales summary with customer name and total sales.
>
>This works fine; however, I am also creating a dynamic link on the customer
>name so that the user can click on it to get a detailed report of sales to
>that customer. This works great EXCEPT for the customers with ampersands in
>thier names. The result of clicking on these customers indicates a "No
>Records found for X" where X is the letter immediately preceding the
>ampersand.
>
>Does anyone know how to get around this?
Would it be practical to link off a unique record_id instead of the noun-name?
That way you can assure that the data you're passing doesn't have any
URL-unfriendly characters, and you guarantee that the data you're retrieving is
the unique data you're linking from.
Dave