hi,
I need to know how to store data ( result set) retrieved from the database into the sessions so that, i need to avoid going to database fetch each time. Is there any possibility to store such huge data in sessions..?
Thanks in advance
Storing Data From Database into Sessions ...?
Moderator: General Moderators
Re: Storing Data From Database into Sessions ...?
Yeah, but sessions are pretty much like a flat file database...so there's not really much point tbh.
Well, I don't think there is anyway.
Well, I don't think there is anyway.
Re: Storing Data From Database into Sessions ...?
Storing data in a session is very simple:
but if you want to store huge data you must remember that there is something like max session size 
Code: Select all
<?php
session_start();
$_SESSION['data'] = $array_of_data_from_db;
Re: Storing Data From Database into Sessions ...?
thanks for ur replyskp wrote:hi,
I need to know how to store data ( result set) retrieved from the database into the sessions so that, i need to avoid going to database fetch each time. Is there any possibility to store such huge data in sessions..?
Thanks in advance