CodeIgniter Forums
CodeIgniter DB Session library - unset/destroy custom variable? - 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: CodeIgniter DB Session library - unset/destroy custom variable? (/showthread.php?tid=15407)



CodeIgniter DB Session library - unset/destroy custom variable? - El Forum - 02-03-2009

[eluser]taewoo[/eluser]
How can I go about unsetting a custom variable that I set via
Code:
$this->db_session->userdata('cart', $cart);

Now... here's a little catch. The session ID during which the "custom variable clearing" occurs is NOT the same session ID as that when the user is adding/deleting from the cart. In fact, it's a separate session.. (to go into detail.. it's b/c Paypal IPN makes a direct call to your server when payment has cleared.. thus different session altogther).

I'm looking for something like..

Code:
$this->db_session->userdata('cart', NULL, $session_id);

Or would i have to my own SQL update directly on the ci_sessions table? If so, what would be the proper way..?