get_results( "SELECT * FROM wp_postmeta left join wp_posts on wp_postmeta.post_id = wp_posts.id WHERE meta_key = 'languages' order by wp_posts.post_title" ); //} //else //{ // if ($cat == 'health-education') $cat = 'health'; // $businesses = $wpdb->get_results( "SELECT * FROM wp_postmeta left join wp_posts on wp_postmeta.post_id = wp_posts.ID WHERE meta_value = '".$cat."' order by wp_posts.post_title" ); //} ?>

,,
get_results( "select meta_value from wp_postmeta where post_id = '".$post_id."' and meta_key = 'languageprogramsumary'" ); $summary = $summary[0]->meta_value; ?>
get_results( "select meta_value from wp_postmeta where post_id = '".$post_id."' and meta_key = 'lat'" ); if ($lat) { //if lat is thereā€¦ go get the lon value: $lon = $wpdb->get_results( "select meta_value from wp_postmeta where post_id = '".$post_id."' and meta_key = 'lon'" ); //then make them easy to use them: $lat = $lat[0]->meta_value; $lon = $lon[0]->meta_value; } else { $address = $business[3]->meta_value; $geocode= simplexml_load_file("http://dev.virtualearth.net/REST/v1/Locations/US/MN/55404/Minneapolis/$address?output=xml&key=AlbuVkRAs5Yqcss8WkxqQFnGox9EPGjwUcuItfMHPjRNKQpO-D2SYSVLQj19rXDH"); $lat = $geocode->ResourceSets->ResourceSet->Resources->Location->Point->Latitude; $lon = $geocode->ResourceSets->ResourceSet->Resources->Location->Point->Longitude; $wpdb->insert('wp_postmeta', array( 'post_id' => $post_id, 'meta_key' => 'lat', 'meta_value' => $lat, )); $wpdb->insert('wp_postmeta', array( 'post_id' => $post_id, 'meta_key' => 'lon', 'meta_value' => $lon, )); } ?>

  • Cultural Survival

  • Email