Querying Multiple Categories With Different Offsets

I had a similar problem with a featured section and ended up doing it like this

Fist create your array variable outside the loop:

$exclude_us = array()

Then add the ID of each post in the first loop into the array (in the first loop):

if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
    $exclude_us[] = get_the_id
    ...the rest of the loop...

And then in your second loop, if a post has that ID, skip it (continue):

if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post();
    if ( in_array ( get_the_id(), $exclude_us ) ) {
        continue;
        }
    ...the rest of the loop...

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