php-db | 2001071
Date: 07/12/01
- Next message: Hoth: "[PHP-DB] How to get a link to next db entry"
- Previous message: Andreas Iwanowski: "Re: [PHP-DB] Order by unix timestamp"
- In reply to: Rankin, Randy: "[PHP-DB] Escaping &"
- Next in thread: leo g. divinagracia iii: "Re: [PHP-DB] Escaping &"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
When they click on the link what is happening? Is it doing a query in the
database for all users with that name? If so you may want to do a
str_replace('&','\&','customer_name') before your query. Basically you
just want to add the \ before the ampersand. I haven't tried this but it
SHOULD work.
Roger
On Thu, 12 Jul 2001, Rankin, Randy 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?
>
> TIA,
>
> Randy Rankin
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Hoth: "[PHP-DB] How to get a link to next db entry"
- Previous message: Andreas Iwanowski: "Re: [PHP-DB] Order by unix timestamp"
- In reply to: Rankin, Randy: "[PHP-DB] Escaping &"
- Next in thread: leo g. divinagracia iii: "Re: [PHP-DB] Escaping &"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

