thanks for your posting.
I have this php code where I'm supposed to fetch all data from one
database and one table:
// Select all the rows in the markers table
$query = "SELECT * FROM vb3_vbmembermap_user WHERE 1";
$result = mysql_query($query);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
header("Content-type: text/xml");
// Iterate through the rows, adding XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE
$node = $dom->createElement("marker");
$newnode = $parnode->appendChild($node);
$newnode->setAttribute("name",$row['username']);
$newnode->setAttribute("address", $row['ort']);
$newnode->setAttribute("lat", $row['latitude']);
$newnode->setAttribute("lng", $row['longitude']);
$newnode->setAttribute("type", $row['plz']);
}
how can I add in the XML node the results of a second a query of a
different table (or
database?).
On 30 Dez., 18:29, "[email protected]" <[email protected]>
On 30 Dez., 18:29, "[email protected]" <[email protected]>
wrote:
> On Dec 30, 11:58 am, diretur <[email protected]> wrote:> hi everybody,
>
> > my problem: I have the latitude and longitude of my website users in
> > the database A and other information I'd like to display in the marker
> > in the database B.
> > How can I merge this information in order to display it together?
>
> > I've already read this
>
> http://code.google.com/support/bin/answer.py?answer=65622&useful=1&sh...
>
> > and succeded in creating a map with the markers (here it
> > is:http://www.mtb-forum.it/gm/map.html), but I really don't have an idea
> > how to solve the 2 databases problem.
>
> This really isn't an API question. How do you tell the marker is the
> same in the two databases (what key are you using to relate them)?
>
> My active volcanoes page:http://www.geocodezip.com/v2_activeVolcanos.asp
> takes data from a feed of active volcanoes and looks them up in a
> database of volcanoes using the "Volcano Number", which is used to
> find the correct entry in the volcano database which is then used to
> populate the "database" tab.
>
> The simplest thing to do would be to put the latitude and longitude in
> database "B".
>
> -- Larry
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---