get_results( $wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key='blogger_permalink' AND meta_value = '% s'", $path) ); //print_r($res); if (count($res)==0) { //echo "Error, path '$path' matches no blogger imports."; header("HTTP/1.1 301 Moved Permanently"); header("Location: http://anyall.org/blog/"); } else if (count($res) > 1) { echo "Error, path '$path' matches many blogger imports."; } else { $post_id = $res[0]->post_id; //print_r($post_id); header("HTTP/1.1 301 Moved Permanently"); header("Location: http://anyall.org/blog/?p=$post_id"); exit(); } ?>