SHARE
TWEET

Untitled

a guest Jan 22nd, 2013 22 Never
  1.  
  2. unset($temp);
  3. $result = mysql_query("SELECT meta_key, meta_value
  4.         FROM wp_postmeta
  5.         WHERE `post_id` = $id
  6.         AND `meta_key`
  7.         IN ('length', 'location_city', 'location_state', 'difficulty')");
  8. $temp[] = mysql_fetch_assoc($result);
  9. print_r($temp); echo "<br>";
  10.  
  11. /* THE RESULTING OUTPUT
  12.  
  13. (
  14.         [0] => Array
  15.         (
  16.                 [meta_key] => location_city
  17.                 [meta_value] => Wabuska
  18.         }
  19. )
RAW Paste Data
Top