![]() |
[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-02-2010 [eluser]maria clara[/eluser] hi to all, i'm creating a function for saving the details. but when i click the save button..it shows me "can't save transaction without details".. here's my code for the function detailpost() in my controller: Code: //----------------------------------------------------------------------- i attached also the image before and after i submit the details. glad to see replies.. thanks in advance, kahtrina [SOLVED] can't save transaction without details - El Forum - 02-02-2010 [eluser]theprodigy[/eluser] can I see the save method in your model, please. [SOLVED] can't save transaction without details - El Forum - 02-02-2010 [eluser]maria clara[/eluser] here's my save functions in my MODEL: Code: function save_detail($id,$rows) //Query for saving the company details [SOLVED] can't save transaction without details - El Forum - 02-02-2010 [eluser]theprodigy[/eluser] In your controller, you are passing in 2 parameters ($dt and $item): Quote:$data['item'] = $this->Sec_users_db->save($dt,$item);But your model function expects 3 parameters ($data, $item, $details): Quote:function save($data,$item,$details) //Save user query [SOLVED] can't save transaction without details - El Forum - 02-02-2010 [eluser]maria clara[/eluser] ahh i see.. maybe that's why can't save without details.. but that is for the listview..my master jqgrid. i have to reconstruct the detailpost function i made for it to be able to save the details in the detail jqgrd list.. but it don't work.. [SOLVED] can't save transaction without details - El Forum - 02-03-2010 [eluser]maria clara[/eluser] i need to make up a function for the detail list to save the data... can anyone help me??? thanks in advance, kahtrina [SOLVED] can't save transaction without details - El Forum - 02-03-2010 [eluser]theprodigy[/eluser] I'm not sure exactly how to help you. You posted some code, I tried to help with that code, but then you told me that the code I helped you with wasn't the code that you need help with. Can you give me a little more detail as to where in your code I should be looking? [SOLVED] can't save transaction without details - El Forum - 02-03-2010 [eluser]maria clara[/eluser] [quote author="theprodigy" date="1265269971"]I'm not sure exactly how to help you. You posted some code, I tried to help with that code, but then you told me that the code I helped you with wasn't the code that you need help with. Can you give me a little more detail as to where in your code I should be looking?[/quote] im sorry for that, the MODEL was right.. like what you've help me.. what i mean is that i have to re-create a code for add,edit and delete in my detaillist of my jqgrid as i shown in the images i attached.. i need to re-create this code for adding, editing, and deleting: Code: switch($postConfig['action']){ because this script was for the master grid.. what i need is a code for the detail list.. thanks in advance, kahtrina [SOLVED] can't save transaction without details - El Forum - 02-03-2010 [eluser]theprodigy[/eluser] and the detail list is the 3-column grid at the bottom of the images, right? I've never used this script, so I'll need a little background on it and what you've tried (so we don't waste time trying again): Are you editing in place (like an Excel spreadsheet)? Does it use ajax to post to the server? Do you need more info then just those 3 columns? What road block are you running into when trying to edit the current code (other then "can't save without details")? What have you tried so far? [SOLVED] can't save transaction without details - El Forum - 02-03-2010 [eluser]maria clara[/eluser] [quote author="theprodigy" date="1265271137"]and the detail list is the 3-column grid at the bottom of the images, right? I've never used this script, so I'll need a little background on it and what you've tried (so we don't waste time trying again): Are you editing in place (like an Excel spreadsheet)? Does it use ajax to post to the server? Do you need more info then just those 3 columns? What road block are you running into when trying to edit the current code (other then "can't save without details")? What have you tried so far?[/quote] yeah you're right that's the detail list at the bottom as you can see there are buttons for add,edit and delete. im trying to add, it works but when i refresh the page the data i added gets lost..in short, it isn't posting.. as i know there is an ajax. i just needed the company_code and the company_name to be posted in the grid. i have used the code i have posted but its not working.. i have tried to change the codes but no luck with it...in this part i have 3 tables joined, the company table, where i am supposed to put the company_code and the company_name in the grid.. and the user table, where the form fields should be save.. and the company access table where the company_id and the role_id of the user was save.. |