I've got a while loop from the query known as $result.

Inside this while loop I've two other queries $anchors1 and $anchors2

The first retrieves the first 2 rows

The 2nd you ought to retrieve the following ones utilizing an offset.

For whatever reason the queries appear to have interaction each other, not exhibiting the three row and tugging a replica row which shouldn't be there.

Can there be in whatever way this queries would interfere? Basically remove the first, the 2nd query works. Same the other way around.

The woking platform is Wordpress.

while($slice = mysql_fetch_assoc($result)){


    if($enable_position1 == 'y' && $i == $position[0]): 

        $anchors1 = mysql_query("SELECT * FROM anchors WHERE site_url = '$site_current' LIMIT 3"); 
        while($anc = mysql_fetch_assoc($anchors)){
        $site_anchor = $anc['site_anchor']; 
        $site_current = $anc['site_current'];
        echo '<li><a href="'.$site_current.'" title="'.$site_anchor.'" target="_self">'.$site_anchor.'</a></li>';

    elseif($enable_position2 == 'y' && $i == $position[1]): 

        $anchors2 = mysql_query("SELECT * FROM anchors WHERE site_url = '$site_current' LIMIT 999 OFFSET 3"); 
        while($anc2 = mysql_fetch_assoc($anchors2)){
        $site_anchor2 = $anc2['site_anchor']; 
        $site_current2 = $anc2['site_current'];
        echo '<li><a href="'.$site_current2.'" title="'.$site_anchor2.'" target="_self">'.$site_anchor2.'</a></li>';





Ty greatly!

Within the second query, you are while using variable $site_current, that is occur the very first query's block. For the way the application was created, that may be leading to the interference. I believe you designed to put $site_current2 there.