Welcome Guest, Not a member yet? Register   Sign In
unserialize query results not working
#12

[eluser]eggshape[/eluser]
hey exodus - great job!

have you tried replacing your implode/explode with serialize/unserialize like you had originally (keep everything else the same)?

also, for future reference, here are some things I would comment:

1. use $data['q1'] = $this->input->post('q1') etc instead of the naked $_POST['q1']. CI has a good Input class that helps to protect your database and data.
2. with a little work, you can get your model class to automatically get your keys (i.e. q1, q2, q3,...) and values from the $_POST superglobal without having to delineate each key and value.
3. and some minor things: you don't need to unset $list, $item, $res. Those variables are "local" to the loop, and at the end of each iteration (closing '}'), they just get cease (garbage-collected). every time you call a function it adds a little overhead to your script (but this is not so important in this case, but imagine your array was a million lines long...you would have 3 million unnecessary function calls.)


Messages In This Thread
unserialize query results not working - by El Forum - 01-15-2008, 10:49 AM
unserialize query results not working - by El Forum - 01-15-2008, 10:52 AM
unserialize query results not working - by El Forum - 01-15-2008, 11:33 AM
unserialize query results not working - by El Forum - 01-15-2008, 12:26 PM
unserialize query results not working - by El Forum - 01-15-2008, 12:38 PM
unserialize query results not working - by El Forum - 01-15-2008, 12:48 PM
unserialize query results not working - by El Forum - 01-15-2008, 01:05 PM
unserialize query results not working - by El Forum - 01-15-2008, 01:19 PM
unserialize query results not working - by El Forum - 01-15-2008, 01:34 PM
unserialize query results not working - by El Forum - 01-15-2008, 01:40 PM
unserialize query results not working - by El Forum - 01-15-2008, 03:14 PM
unserialize query results not working - by El Forum - 01-15-2008, 08:52 PM
unserialize query results not working - by El Forum - 01-18-2008, 03:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB