Member Login

Resources

Developers Blog
GMapsPRO Demo
Bug Tracker
-----------------------------------
GMaps Community Forums
GMaps Subscriber Forums
-----------------------------------
Google Maps API Reference
Google Maps Group Forum

Who's Online

We have 4 guests online

Affiliates



SQL Error when trying to add a Marker PDF Print E-mail

It was reported to me today of an issue when trying to add a marker.  The error reported was:

DB function failed with error number 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 'select map_id from jos_gmaps_points where item_id = 0)' at line SQL=select id as value, title as text from jos_gmaps_maps where id not in (select map_id from jos_gmaps_points where item_id = 0)

After researching this issue, we have determined that this issue was caused by the version of MySQL being used on the site.  This user is using MySQL 4.0.x.  To resolve this issue, the database needs to be upgraded to at least version 4.1 or you can change the following in the htmlhelper.class.php file:

This file exists in two locations .. administrator/components/com_gmapspro/classes and components/com_gmapspro/classes (replace com_gmapspro with com_gmaps for the basic build).  Update both locations. 

        $query = "select id as value, title as text from #__gmaps_maps where id not in (select map_id from #__gmaps_points where item_id = " . $markerid . ")";

TO .....

        $query = "select id as value, title as text from #__gmaps_maps";

This is just a work around.  The issue with this work around is that it will enable you to assign a marker to a map multiple times.  This SQL is intended to filter the select list to prevent maps from being listed when that given marker is already assigned.

THIS APPLIES TO BE GMAPS AND GMAPSPRO. 

 

 
Next >