[eluser]maria clara[/eluser]
[quote author="theprodigy" date="1265370837"]well, right now you don't have any table assigned to it, and if it's supposed to be saved to maint_company table, then you might need to join that table in with your query as right now you don't have that table listed to pull data from.
And, this is a SELECT query, not an INSERT query. If the data in company_code is supposed to be SAVED into the database, then you might need to change the type of query you are executing.[/quote]
i have that
maint_company table. i have tried this:
Code:
case $crudConfig['create']:
$c = "";
$dt['company_code'] = $this->input->post('company_code');
[b] $sec_exist = $this->Main_company_db->getDetails($dt);[/b]
if ($sec_exist)
{
$c .= 'Company ID already exists.';
$data['action'] = 'exist';
}
else
{
$fields = array(
"company_code"
,"company_name"
);
foreach ($fields as $field)
{if (isset($_POST[$field])) $dt[$field] = $this->input->post($field);}
$item = $this->input->post("item");
[b]$data['item'] = $this->Main_company_db->save($dt,$item);[/b]
}
break;
but there's no image shown in my browser..