Hi,
My site is based on a Google Maps mashup and i currently use the following to display information related to my regional markers:
var html ='<div id="infowindow"><div id="infodescr"><h1>' + title + '</h1>' + description + '</div><div id="regional_poi">This is where i need a php script to display the result of its sql query for poi in this region</div><div id="infofooter"></div></di
v>';
What i'm trying to do is, display the title of all records from the 'locations' table of my database, where reg_id = the id of the current regional marker.
I started to write this sql query in php as follows:
$query_regions_poi = mysql_query("SELECT * FROM locations WHERE reg_id = regions['id']");
while ($row=mysql_fetch_assoc($q
uery_regio
ns_poi)){
echo '<poi_in_region poi_id="'.$row['id'].'" title="'.parseToXML($row['
title']).'
" date="'.$row['date'].'"/>'
;
}
... but i'm not sure about 2 things:
1. the WHERE clause - how can i pass it the 'id' of the current (regional) marker?
2. how do i display the results of this query in the place of the above text ("This is where i need a php script to display the result of its sql query for poi in this region")?
Many thanks for any advice
Start Free Trial