I am using phpExcel library for import data from excel(csv) file into mysql data. Every thing is working fine except mysql insert query below is my source code. Please after review my codes let me know where is problem. I have tried with an array but im fail too. Please review my mysql query and let me know which query will be better in this PhpExcel Library. Thanks in advance.


PHP Code:
$objPHPExcel PHPExcel_IOFactory::load("myfile.csv");
foreach (
$objPHPExcel->getWorksheetIterator() as $worksheet) {

$worksheetTitle     $worksheet->getTitle();
$highestRow         $worksheet->getHighestRow();
$highestColumn      $worksheet->getHighestColumn();
$highestColumnIndex PHPExcel_Cell::columnIndexFromString($highestColumn);
$nrColumns ord($highestColumn) - 64;

for (
$row=2$row<=$highestRow$row++) {
$cell $worksheet->getCellByColumnAndRow(3$row)->getValue();

 
mysql_query("INSERT INTO myTableName (`title`) VALUES ('$cell')");   

}