The user could receive a message after the upload is complete that says something like, "Your file has been successfully uploaded and will be processed shortly". Once the backend process has run then they are emailed to its completion.
On Fri, Feb 20, 2009 at 8:43 AM, PHPScriptor <contact@phpscriptor.com> wrote:
Hello,
My user is uploading every day a excel-file with about 6000 rows to his
website. The excel file is readed and the data is inserted in the
mysql-database. But that takes a lot of time (not even thinking about the
possible time-out). So is there a way that I could program it better?
Now I do:
$myModel = new MyModel();
for($i=0;$i<count(excelrows);$i) {
//get the excel row data
//prepare the data for insert
$data = array('col1'=>$value1,'col2'=>$value3);
// insert it
$myModel->insert($data);
}
Reading the excel-file doesn't take that mutch time. So it is those 6000
sql's that are executed that takes time. Is there a way that a could get all
the data in a array and do 1 insert?
-----
visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context: http://www.nabble.com/large-data-insert-%28performance%29-tp22120411p22120411.html
Sent from the Zend DB mailing list archive at Nabble.com.
--
Cory Wiles
kwylez@gmail.com
http://www.corywiles.com
http://www.400mtogo.com
没有评论:
发表评论