wp_insert_post order problem

I found a solution. I just set my own value for the “post_date” field in the wp_insert_post function.

As an example:

$time = time();
for ($i=0; $i < count($postArgs); $i++) { 
    $postArg = $postArgs[$i];
    $postArg['post_date'] = $time-$i;
    wp_insert_post($postArg);
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)