NickCB Posted January 11, 2013 Share Posted January 11, 2013 I am building a directory site with a Joomla component that has a Google Map facility but not up to the high standard and functionality of another map component I am using. So, to save on work I ask this: Within the map an info block pops up when you click the marker icon. As with Google Maps. I need information in these blocks. I have the information already in the directory database so do not want to duplicate it. To display the same information in the directory within the map block can I use the following code where it allows me to insert code and add in the relevant information: {source}<?php $query = $db->getQuery(true); $query->select($db->nameQuote('something')); $query->from('#__mydatabasetable'); $query->where($db->nameQuote('this').' = '.$db->quote('that')); $db->setQuery($query); $result = $database->loadResult(); ?>{/source} Does this mean I can display information from another table within the same database? If so, I would like to do display the following: If the ID of this Marker icon matches the ID of e.g.databaseXYZ, then enter information from databaseabc, column123. If I can, what is the relevant information and where does it go? Link to comment https://forums.phpfreaks.com/topic/273011-using-php-to-search-a-mysql-database-and-return-information/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.