csvreader.php
/*
 * Returns matched post IDs for a pair of meta key and meta value from database
 *
 * @param string $meta_key
 * @param mixed $meta_value
 *
 * @return array|int Post ID(s)
 */
Returns matched post IDs for a pair of meta key and meta value from database
@param string $meta_key
@param mixed $meta_value


Returns matched post IDs for a pair of meta key and meta value from database @param string $meta_key @param mixed $meta_value
function misha_post_id_by_meta_key_and_value( $meta_key, $meta_value ){
    global $wpdb;
    $ids = $wpdb->get_col( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %s", $meta_key, $meta_value ) );
    if( count( $ids ) > 1 )
        return $ids; 
    else
        return $ids[0]; 
}
function misha_post_id_by_meta_key_and_value ( $ meta_key , $ meta_value ) { global $ wpdb ; $ ids = $ wpdb -> get_col ( $ wpdb -> prepare ( " SELECT post_id FROM  $ wpdb -> postmeta  WHERE meta_key = %s AND meta_value = %s " , $ meta_key , $ meta_value ) ) ; if ( count ( $ ids ) > 1 ) return $ ids ; else return $ ids [ 0 ] ; }
Returns matched post IDs for a pair of meta key and meta value from database
 @param string $meta_key
 @param mixed $meta_value
Returns matched post IDs for a pair of meta key and meta value from database @param string $meta_key @param mixed $meta_value
// return array // return int