![]() |
Flashdata: Accessing flash:new vs flash:old - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Flashdata: Accessing flash:new vs flash:old (/showthread.php?tid=55372) |
Flashdata: Accessing flash:new vs flash:old - El Forum - 10-23-2012 [eluser]sethkain[/eluser] I am using flashdata to keep track of how columns in my table are being sorted. But when I switch from one table column to another there is a delay in them sorting correctly. I think it is because of flash:new vs flash:old. The first time I click on Company I get: [flash:new:Company] => desc The second time I get: [flash:old:Company] => desc [flash:new:Company] => asc Then if I click on Contract Num I get: [flash:old:Company] => asc [flash:new:Contract Num] => desc I need to be able to access the flash:new variable when I call:cotr_contract_list_sort($sort_field) $sort_field is a table column name. (ex. Company Name, Contract Num, etc.) Code: public function cotr_contract_list_sort($sort_field){ Thanks In Advance! Flashdata: Accessing flash:new vs flash:old - El Forum - 10-24-2012 [eluser]Aken[/eluser] Flashdata is retrieved using session->flashdata(), not session->userdata(). And you don't show how you're setting the column or how this function is being called. |