public function getMidByKey( $post_id, $meta_key ) {

		/** @var \wpdb $wpdb */
		global $wpdb;
		$mid = $wpdb->get_var( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s LIMIT 1 ", $post_id, $meta_key ) );
		if ( ! empty( $mid ) ) {
			return absint( $mid );
		}

		return false;
	}
public function getMidByKey( $post_id, $meta_key ) {

		/** @var \wpdb $wpdb */
		global $wpdb;
		$mid = $wpdb->get_var( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s LIMIT 1 ", $post_id, $meta_key ) );
		if ( ! empty( $mid ) ) {
			return absint( $mid );
		}

		return false;
	}
public function getMidByKey ( $ post_id , $ meta_key ) { /** @var \wpdb $wpdb */ global $ wpdb ; $ mid = $ wpdb -> get_var ( $ wpdb -> prepare ( "SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s LIMIT 1 " , $ post_id , $ meta_key ) ) ; if ( ! empty ( $ mid ) ) { return absint ( $ mid ) ; } return false ; }
Return a database ID for a given meta key.

@param int $post_id
@param string $meta_key

@return int|bool
Return a database ID for a given meta key .