How do I get the result from a database and show it?
//here $id value is hard-coded to 1, you can use your own logic to get the value.
$id = 1;
$result = db_query("select name, company_name, geo_location from {data_set} where id=:id", array(':id' =&gt; $id));

//To iterate over each row of the resultset use foreach
foreach($result as $ind_data) {
  echo "name is " . $ind_data-&gt;name . "&lt;br/&gt;";
  echo "company name is " . $ind_data-&gt;company_name . "&lt;br/&gt;";
  echo "geolocation is " . $ind_data-&gt;geo_location . "&lt;br/&gt;";
}