Stenudd / feed-the-waze

Automatically exported from code.google.com/p/feed-the-waze
0 stars 0 forks source link

If the road has the ' character in the name, SQL query generates an error #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. look for a road containing the ' character. In Italy there's plenty of them. 
Actually I had the problem while reporting on Via dell'Accademia, Mantova
2. Insert a new event on that road
3. Click send and Then you got the error in the popup window

What is the expected output? What do you see instead?
I see an sql error while I should have the usual "Everything has gone well" 
popup window

What version of the product are you using? On what operating system?
this is independent from the system

Please provide any additional information below.
Have a nice work :)

Original issue reported on code.google.com by pierluig...@gmail.com on 28 Sep 2012 at 6:49

GoogleCodeExporter commented 9 years ago
The same error happens when you have the apostrophe character in the 
description field.
"Error: 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 't 
Ven.',start_time='10-20-2012 00:00:00 GMT+02:00',expected_end_time='10-21-2012' 
at line 1"

Most likely no escape is used ("\'") when the SQL statement is sent to MySQL.

Original comment by zoltan.m...@gmail.com on 15 Oct 2012 at 11:00