Closed (duplicate)
Project:
KML
Version:
master
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2007 at 11:48 UTC
Updated:
10 Sep 2008 at 11:42 UTC
Hi,
I've just installed your very interesting module to experiment on the NZ GPS Society's website.
I installed KML.module, location.module was of course already installed. I clicked on a KML link on a spatially-enabled node but it didn't open properly in Google Earth. I went node > edit and received the following error which appeared to be caused by kml.module.
* user warning: 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 l.eid FROM location l WHERE l.source != 0 AND l.type = ' query: SELECT n.nid, n.created FROM node n WHERE n.status = 1 AND n.vid IN (SELECT l.eid FROM location l WHERE l.source != 0 AND l.type = 'node' AND l.eid = n.vid) AND n.nid = 141 in /home/gpsorgnz/public_html/includes/database.mysql.inc on line 121.
* warning: Invalid argument supplied for foreach() in /home/gpsorgnz/public_html/modules/kml/kml.module on line 451.
* user warning: 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 l.eid FROM location l WHERE l.source != 0 AND l.type = ' query: SELECT n.nid, n.created FROM node n WHERE n.status = 1 AND n.vid IN (SELECT l.eid FROM location l WHERE l.source != 0 AND l.type = 'node' AND l.eid = n.vid) AND n.nid = 141 in /home/gpsorgnz/public_html/includes/database.mysql.inc on line 121.
* warning: Invalid argument supplied for foreach() in /home/gpsorgnz/public_html/modules/kml/kml.module on line 451.
The node works fine with location and gmap - it is mapping it in Google Maps.
Comments
Comment #1
geodaniel commentedPlease could you confirm which version of MySQL you're using? I suspect the problem is that I've started using a subquery where previously there wasn't one, and subqueries are only possible in MySQL 4.1 and newer. I'll look into doing this a different way...
As for the foreach error, that's already noted in #113006.
Comment #2
rediguana commentedThe hosting company is providing 4.0.27-standard - so that might be part of the problem.
Cheers Gav
Comment #3
geodaniel commentedComment #4
geodaniel commentedClosing this as a dup of #146895: Make KML module MySQL 4.0 compatible: rewrite queries without subqueries.