Database Refresh Qustion



I have written some php code to export all the data from my table called wp_tenders to a csv file. The export code is writing successfully to a file.

However, if the user adds in a tender a few seconds earlier then clicks the export code option, the most recent record is not added to the csv file.

Is there a way to refresh the table so I get all the records.