I am creating an RSS feed. I have created a table in my database with 400 post id's. I have the rss feed coded I am now trying to link the two so my RSS feed runs only for the list of 400 posts from my table.
On my RSS feed page I can create an array by using a couple of id's (see below)
$myarray2 = array(12345,12346); $args = array( 'post_type' => 'posttype', 'post__in' => $myarray2 );
This works and creates an RSS feed for id's 12345,12346.
I can also print the array of my 400 database table records on the page as follows;
$myarray = $wpdb->get_results("SELECT * FROM my_table"); print_r($myarray)
This produces data of this form
(  => stdClass Object ( [id] => 145 )  => stdClass Object ( [id] => 4573 )  => continues..... )
However I can not seem to get the code right to use
post__in for example
$myarray = $wpdb->get_results("SELECT * FROM my_table"); $args = array( 'post_type' => 'posttype', 'post__in' => $myarray );
does not work. I have tried various variations but I am missing something about how to deliver a list of post id's from my array to
What am I missing?