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 sleep()
in between those two database operations ?
$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