On 2/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > "CrazyChris" <[EMAIL PROTECTED]> writes: > > > Hi there, > > > > I have a need to create a :memory: sqlite database, but save it into the > > user session (PHP) but can't see a way to access the data to save. Looking > > for a sqlite version of serialize() I guess. > > > > Has anyone managed to do this? Is it even possible? > > > > Wanting to be able to maintain a large chunk of data across a users session > > on a website, and the array's are getting tedious to manage and search > > through! > > The PHP session information has to be persistent, so it's not going to be easy > to use a :memory: database. There is lots of information about how to save > session information to a database, though, on the PHP web site. I haven't > looked at it in a couple of years, but I'd guess that you'll get some good > pointers if you look at the documentation for session_set_save_handler(). > > Also, IIRC, PHP provides functions to do serialization. You won't need them > if you go the session_set_save_handler() route, but if you want to serialize > data yourself, those functions should be available. > > Derrell >
I think Derrel is right. If you use a :memory: database, maybe you succeed on first page, but I guarrante your session will be destroyed on the other page, why? cause you create a brand new :memory: database. In order if you want to use sqlite session as save handler you can use it on php5, or you can create your own session rules. Take a look a php session documentation for it. -- Firman Wandayandi Never Dreamt Before: http://firman.dotgeek.org/ Wishlist: http://www.amazon.com/gp/registry/1AAN8NZBHW2W9

