Crazzy query idea |
[eluser]Atrhick[/eluser]
Hello guys, I'm not a very good programmer so this maybe very simple but I'm going to ask anyhow. here is what I need to do I'm collecting this data from the view using post. Code: function add_test() { My problem is the when the user is creating a test they can create 350 questions in one test "yes the database can hold all that data in one table row" is there a loop i can create or something that will do what i have above based on how much data in coming in? I don't this its good coding practice for me to do the above code 350 time... or do I have to?
[eluser]Rolly1971[/eluser]
you could try something like this: Code: $postdata = $this->input->post();
[eluser]Atrhick[/eluser]
[quote author="Rolly1971" date="1405537411"]you could try something like this: Code: $postdata = $this->input->post(); wow thank you that worked perfectly!!!! I only had to unset some post but it works like a charm!! i can't believe how easy and small this code was compared to what i was thinking of doing.. its a good thing i asked.
[eluser]CroNiX[/eluser]
He doesn't need to manually use escape anyway since he's using active record. Now things are going through escape twice.
[eluser]CroNiX[/eluser]
All of this: Code: $postdata = $this->input->post(); does the exact same thing as: Code: $this->db->insert('tests', $this->input->post()); |
Welcome Guest, Not a member yet? Register Sign In |