i'm trying to import data from table to custom post types below is the code i'm using but this $row['Title'] return nothing ... if i hard code it works
$rows = $wpdb->get_results( "SELECT * FROM Products");
foreach ($rows as $row)
{
$new_post = wp_insert_post(array(
'post_type' => 'products',
'post_status' => 'publish',
'post_author' => $authorID,
'post_title' => $row['Title']
));
if( !is_wp_error($new_post) )
{
update_post_meta($new_post, "shakamaka", $row['DocFileID']);
}
};