The discussions here are for Smarty, a template engine for the PHP programming language.
Joined: 18 Feb 2008
|Posted: Wed Feb 20, 2008 9:57 pm Post subject: GoogleMapsAPI 2.5 DB error not found problem
|I am using php 4.3.1 on XP system. After install of
the 2.5 API, I loaded the sample code from the
README file, and created the GEOCODES table in my MYsql database. Running the sample code all I was
getting was a...
DB error: not found
I finally commented out the three addMarkerByAddress() lines so nothing would get
written to the database. Then at least I would get
a blank map printed. I thought I had a PEAR problem.
So I reloaded PEAR. Same error results.
I uploaded the API and the sample code to my
website, as they are running php 5.2 and their own
copy of Pear. I created the goecodes table on the
remote database. Ran the sample code, SAME error
on the different machine, differnet php and diff'
I need some help debugging this one.
Hers the code..
$map = new GoogleMapAPI('map');
// setup database for geocode caching
// enter YOUR Google Map Key
// create some map markers
$map->addMarkerByAddress('621 N 48th St # 6 Lincoln NE 68502','PJ Pizza','<b>PJ Pizza</b>');
$map->addMarkerByAddress('826 P St Lincoln NE 68502','Old Chicago','<b>Old Chicago</b>');
$map->addMarkerByAddress('3457 Holdrege St Lincoln NE 68502',"Valentino's","<b>Valentino's</b>");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<?php $map->printHeaderJS(); ?>
<?php $map->printMapJS(); ?>
<!-- necessary for google maps polyline drawing in IE -->
<?php $map->printMap(); ?>
<?php $map->printSidebar(); ?>
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Powered by phpBB © 2001, 2005 phpBB Group