Hello all,
I want to compare if the table already has a record with the same name as in the csv file, if it has already the record it just simply updates it…
$cols = str_getcsv($line, ';', '"');//csv file
$fields = ImportationDetail::model()->findAll();
$modelA = $modelApp::model()->findByAttributes(array($fields[] => $cols[]));
if (!$model)
$model = new $args[0];
But im getting this error
Illegal offset type
$modelA = $modelApp::model()->findByAttributes(array($fields[] => $cols[]));
Can you help to compare the two objects?