title: Does PHP wait for mysql query result?
body: <p>My code snippet looks like this. First two lines will insert some data to a table and the file included on the third line will work on that data. The insert may take few seconds. Will PHP wait for result from MySQL query before going to the third line code which will include other PHP file ? Do I need to add <code>sleep()</code> in between those two database operations ?</p>
  
  <pre><code>    $sql = "INSERT INTO STAGINGINDEX(SYMBOL,TURNOVER,CURRENT) VALUES (TRIM('{$full_index[$i]}'),TRIM({$full_index[$i+1]}),TRIM({$full_index[$i+2]}))";
      mysqli_query($conn,$sql); 
  
  
      include 'index_insert.php'; // this php code works on the data that is inserted by above query
  </code></pre>