[eluser]Unknown[/eluser]
Hello,
I have an import file, with wich I want to import some from a file into a database. When I call the file I get this errors
Code:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: code
Filename: controllers/import.php
Line Number: 217
A PHP Error was encountered
Severity: Notice
Message: Undefined index: id_producator
Filename: controllers/import.php
Line Number: 237
A PHP Error was encountered
Severity: Notice
Message: Undefined index: code
Filename: controllers/import.php
Line Number: 513
the cod from those lines is this
line 217
Code:
$chars=array(' ','/','.','-','(',')',"'", '"');
$articol=str_replace($chars,'',str_replace('_','',$field['code']));
line 237
Code:
$this->db->select('A.ART_ID');
$this->db->from('tof_articles AS A');
$this->db->where('AVT_NR',$articol);
if ($this->input->post('producator') && $this->input->post('producator') != 0 && $this->input->post('producator') != -1){
$this->db->where('A.ART_SUP_ID',$this->input->post('producator'));
}
if ($this->input->post('producator') && $this->input->post('producator') == -1){
[color=red] $this->db->where('A.ART_SUP_ID',$field['id_producator']);[/color]
}
$query=$this->db->get();
line 513
Code:
if($query->num_rows() > 1){
$data['esuate_mare'][]=str_replace('_','',$field['code']).' -> ';
} else {
[color=red]$data['esuate_mic'][]=str_replace('_','',$field['code']).' -> ';[/color]
}