Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] delete row
#13

[eluser]maria clara[/eluser]
when i have the
Code:
$this->db->where('user_id', $data['user_id']);
in my MODEL delete function i got this message from my console

Quote:DELETE FROM `erp_maint_company`
WHERE `company_id` = '47'
AND `company_id` = '47'

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message: Undefined index: user_id</p> <-------- user_id shows undefined
<p>Filename: models/users_db.php</p>
<p>Line Number: 307</p>

</div>DELETE FROM `erp_sec_companyaccess`
WHERE `user_id` IS NULL <---------- and it is NULL
AND `company_id` = '47'
AND `company_id` = '47'{"company_id":"47"}

maybe because im trying to delete the company_id only from the maint_company and sec_companyaccess table.

but when i commented the
Code:
//$this->db->where('user_id', $data['user_id']);
it shows me no undefined index for user_id. but when i click the refresh button in the jqgrid, the one i deleted shows up again and the records becomes 10 again instead of 9. i have 10 records.

EDIT:

Quote:DELETE FROM `erp_maint_company`
WHERE `company_id` = '48'
AND `company_id` = '48'DELETE FROM `erp_sec_companyaccess`
WHERE `company_id` = '48'
AND `company_id` = '48'{"company_id":"48"}

in this, it shows that it is deleted but actually it is not. it will be just deleted if i will delete it straight in the table where it is located.

i attached images for you to see.


Messages In This Thread
[SOLVED] delete row - by El Forum - 02-15-2010, 08:49 PM
[SOLVED] delete row - by El Forum - 02-15-2010, 09:33 PM
[SOLVED] delete row - by El Forum - 02-15-2010, 10:02 PM
[SOLVED] delete row - by El Forum - 02-15-2010, 10:09 PM
[SOLVED] delete row - by El Forum - 02-15-2010, 11:43 PM
[SOLVED] delete row - by El Forum - 02-15-2010, 11:50 PM
[SOLVED] delete row - by El Forum - 02-15-2010, 11:57 PM
[SOLVED] delete row - by El Forum - 02-16-2010, 12:03 AM
[SOLVED] delete row - by El Forum - 02-16-2010, 12:09 AM
[SOLVED] delete row - by El Forum - 02-16-2010, 12:26 AM
[SOLVED] delete row - by El Forum - 02-17-2010, 08:04 PM
[SOLVED] delete row - by El Forum - 02-17-2010, 08:49 PM
[SOLVED] delete row - by El Forum - 02-17-2010, 09:00 PM
[SOLVED] delete row - by El Forum - 02-17-2010, 10:12 PM
[SOLVED] delete row - by El Forum - 02-17-2010, 10:54 PM
[SOLVED] delete row - by El Forum - 02-18-2010, 12:37 AM
[SOLVED] delete row - by El Forum - 02-18-2010, 12:54 AM
[SOLVED] delete row - by El Forum - 02-18-2010, 09:32 AM
[SOLVED] delete row - by El Forum - 02-21-2010, 07:09 PM
[SOLVED] delete row - by El Forum - 02-22-2010, 01:22 AM
[SOLVED] delete row - by El Forum - 02-22-2010, 01:28 AM
[SOLVED] delete row - by El Forum - 02-22-2010, 02:42 AM
[SOLVED] delete row - by El Forum - 03-03-2010, 01:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB