PDA

View Full Version : apostrphe on location name


superchief
9th of September 2006 (Sat), 08:38
I get the following error when trying to use an apostrphe in a location name (example: Devil's Slide, UT)

Exhibit Engine MySQL error!
ERROR FROM QUERY get_location_id in page 'photoeditor':

------------------------------
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 's Slide, UT'' at line 6
Is it possible to use an apostrphe in a location name or am I doing something wrong?

This is with EE 1.5 RC 4.

Pekka
9th of September 2006 (Sat), 09:24
in EDITOR_location.php change

$location_name_to_sql = ee_addslashes($location_name[$n]);
$location_info_to_sql = ee_addslashes($location_info[$n]);

to

$location_name_to_sql = addslashes($location_name[$n]);
$location_info_to_sql = addslashes($location_info[$n]);

That should help.

superchief
9th of September 2006 (Sat), 10:52
Thanks,

I made the two changes, but still get error. Even with the error, it does however add the name with the list of locations available in the photo browser.