Reputation: 4047
If i have a foreach.
$arr = ('one','two','three','four');
foreach($arr as $val){
//query
}
and a column called tmp
in table. There is possible save the exactly moment of insertion ?
With timestamp
,i got for all array elements same time (2011-10-26 18:56:31)
- equal for all.
I think there is possible detect that the element one is inserted before the element two and so on, correct ?
thanks
Upvotes: 0
Views: 69
Reputation: 4931
If you are doing 4 separate queries then you could use PHPs microtime() and store that in the database.
$theTime = microtime(true); // 1319653454.7554
Upvotes: 2
Reputation:
you can use mktime before and after your sql query and count how much time was taken for insert and when it was done.
Upvotes: 0
Reputation: 50966
I think there is possible detect that the element one is inserted before the element two and so on, correct ?
AUTO_INCREMENT field and microtime(true)
in PHP
Upvotes: 0