Using PHP to search a MySQL database and return information.

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...