title: Check mysql query result to run second query which is not available in first query result
body: <p>I have this code:</p>
  
  <pre><code>$sql = "SELECT ns, id FROM `dns` WHERE `ns` = 1 LIMIT 0, 30 ";       
  $result = mysql_query($sql);
  
  // After this I need to run second query which is not available in first query. Help me with this please.
  $sql2 = "SELECT ns, id FROM `dns` WHERE `ns` = 1 AND `id` = not available in first query, how to do that? LIMIT 0, 30 ";         
  $result = mysql_query($sql);
  
  // I can then echo my first query result here 
  // I can then echo my second query result here 
  </code></pre>
  
  <p>What I need to do is to check the first result to run the second query. I set the limit on purpose. For example if the <code>id</code> from 1 to 30 is available in first query. The second query will query <code>id</code> for example starting from 31 to 60.</p>
  
  <p>I hope you can understand what I'm trying to say. Thanks in advance.</p>
  
  <p><strong>UPDATE</strong>: I need to make dig lookup with the query result. The query result is nameserver. Because dig response speed is random so I was thinking I want to split for example: 30 result from 90 nameserver and run 3 simultaneous dig lookup. So thats why the second query (nameserver) result should not available in the first query result and the third query result should not available in the second query result. I need to use all 3 result for later use. I realy appreciate your response. Thank you.</p>