PDA

View Full Version : Bug when username contains ' apostrophe character



alexm
26-08-2010, 10:11
We have a user whose username looks like this: re'M'ington

He gets the following error on accessing the shop:


1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'M'ington', 'm', 're'M'ington', 'sdfsdf@sdfsdf.com', '0', '1')' at line 1

insert into osc_customers (customers_id, customers_username, customers_gender, customers_firstname, customers_email_address, customers_default_address_id, customers_newsletter) VALUES ('800', 're'M'ington', 'm', 're'M'ington', 'sdfsdf@sdfsdf.com', '0', '1')

[TEP STOP]

Obviously something to do with the ' ' in his username. Any ideas for a fix?

thanks,

Alex

Greystoke
26-08-2010, 14:13
Email sent with fix.

Please let me know how you get on with it.