Hi there,
I tried to get the KML module to work but I got the following error
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 drupallocation l WHERE l.source != 0 AND l.ty query: SELECT n.nid, n.created FROM drupalnode n WHERE n.status = 1 AND n.vid IN (SELECT l.eid FROM drupallocation l WHERE l.source != 0 AND l.type = 'node' AND l.eid = n.vid) AND n.nid = 1 in /files/vitis-tct/www.florisla.be/maarten/drupal/includes/database.mysql.inc on line 172.
and the KMLs didn't contain latitude and longitude (see uploaded file)
I relogged in and the error message was gone, but the KML still doesn't contain lat/long.
I noticed a similar problem reported at http://drupal.org/node/132418, but the suggested solution (install latest version of location module) doesn't apply becaus I'm already running the latest versions (Drupal 5.1, location 5.x-1.x-dev, KML 5.x-1.x-dev).
Any suggestions? Thanks
PS: can I do something about the strange date and time of this post?
| Comment | File | Size | Author |
|---|---|---|---|
| nodes_0.txt | 199 bytes | maartenzam |
Comments
Comment #1
maartenzam commentedI'm sorry, please don't mind my PS. Stupid mistake...
Comment #2
maartenzam commentedI found out what caused the error. The kml-module uses a sql-query with a subquery to get the nodes with location data:
$nodes = db_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 = %d", $b);And the mysql on my webserver is version 4.0.25 and subqueries are only supported since version 4.1. Has anyone any idea how I could rewrite the query without using the subquery?
Thanks
Comment #3
maartenzam commentedChanged the title to a more appropriate one.
Comment #4
geodaniel commentedComment #5
tmcw commentedThe KML module 2.x will not support MySQL 4.0 (5.1 is out now, 4.0 is just too old)