Hello everyone,
I’m developing a small extractor from a excel file to file up a mysql db.
I’m using phpexcel to read the excel file and using doctrine in stand alone to manipulate de db.
My problem is that when i want to save the data in the db, the call of the save function never ends.
[code=php]$rowIterator = $feuille->getRowIterator();
$listePersonnes = new Doctrine_Collection(‘PERSONNES’);
foreach ($rowIterator as $row) {
$rowIndex = $row->getRowIndex();
if (1 == $rowIndex) { continue; }
$cellIterator = $row->getCellIterator();
$cellIterator->setIterateOnlyExistingCells(false);
$listePersonnes[$rowIndex] = new PERSONNES();
foreach ($cellIterator as $cell) {
$value = trim($cell->getValue());
$column = $cell->getColumn();
switch ($column) {
//specific process for each column
}
}
echo “<hr/>”;
}
//this is the line which never ends
$listePersonnes->save();[/code]
I tried a of different ways in order to fixed it but the only thing which goes wrong is the last line, and i don’t know why.
Does somebody can help me ?
If you need my model, just tell me