Hi I have data to upload to a Mysql database and I need to get the time taken for each row to be inserted so that I can pass that number through to a progress bar. I have alreay tried accomplishing this by determining the number of rows affetced by the insertion then find the percentage of that number which is not the correct manner to do this.

here is the code

```
$result3=mysql_query("INSERT INTO dest_table.create_info SELECT * from Profusion.source_cdr") or die(mysql_error());
$progress=mysql_affected_rows();
// Total processes
$total = $progress;
// Loop through process
for($i=1; $i<=$total; $i++){
// Calculate the percentage
$percent = intval($i/$total * 100)."%";
echo $percent;
```

this actually divides the total number of rows by 1 and multiplies by 100 to get the percentage and this is wrong .

I need the time taken for each row to be inserted and then find the percentage of that.

Your help will be highly appreciated.