![]() |
[SOLVED] can't save transaction without details - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: [SOLVED] can't save transaction without details (/showthread.php?tid=27165) |
[SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]theprodigy[/eluser] Quote:<b>Fatal error</b>: Call to a member function getDetails() on a non-object in <b>C:\xampp\htdocs\comunion\system\application\modules\sec_users\controllers\sec_users.php</b> on line <b>538</b><br /> I think we just found part of your problem. I'm assuming: Code: $sec_exist = $this->Sec_users_db->getDetails($dt); Did you load that model? If you did, check case sensitivity (sec_users_db instead of Sec_users_db) [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]maria clara[/eluser] yes , Code: $sec_exist = $this->Sec_users_db->getDetails($dt); i have this: Code: $this->load->model('Users_db','User'); so i did this: Code: $sec_exist = $this->User->getDetails($dt); and my console show me this: Quote:Array [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]maria clara[/eluser] and this: Quote:<h1>A Database Error Occurred</h1> [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]theprodigy[/eluser] ok, so now delete the print_r($_POST) line (that was just for debugging, but it is throwing off modifying of headers) [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]theprodigy[/eluser] attach a table name (or alias) to your where clause column. Instead of WHERE `company_code` = ‘hdh’ set it to be WHERE `erp_sec_users`.`company_code` = ‘hdh’ (or whatever table it is that contains that column) [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]maria clara[/eluser] [quote author="theprodigy" date="1265370505"]attach a table name (or alias) to your where clause column. Instead of WHERE `company_code` = ‘hdh’ set it to be WHERE `erp_sec_users`.`company_code` = ‘hdh’ (or whatever table it is that contains that column)[/quote] its because the company_code is to be save to Maint_company table...not in sec_users table... i think i have a wrong table... what do you think?? [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [eluser]theprodigy[/eluser] 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. [SOLVED] can't save transaction without details - El Forum - 02-04-2010 [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']: but there's no image shown in my browser.. [SOLVED] can't save transaction without details - El Forum - 02-05-2010 [eluser]theprodigy[/eluser] Quote:$data['item'] = $this->Main_company_db->save($dt,$item);Is that supposed to be Code: $data['item'] = $this->Maint_company_db->save($dt,$item); (with a 't' on Maint) ? [SOLVED] can't save transaction without details - El Forum - 02-05-2010 [eluser]maria clara[/eluser] i have tried this: Code: $data['item'] = $this->Maint_company_db->save($dt,$item); and it shows my console this error: Quote:A PHP Error was encountered</h4> |