Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 22nd, 2013  |  syntax: PHP  |  size: 0.38 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. )
clone this paste RAW Paste Data