Re: Using and Echoing Session Variables

From: Date: Mon, 19 Jul 2004 07:03:30 +0000
Subject: Re: Using and Echoing Session Variables
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-190983@lists.php.net to get a copy of this message
Ligaya Turmelle wrote:
if they are all coming from the same query can't you assign them using the fetch_assoc?
Sure!
Ex: $data = mysql_fetch_assoc($result); $_SESSION['column1'] = $data['column1']; $_SESSION['column2'] = $data['column2']; $_SESSION['column3'] = $data['column3']; ... Or am I confused :)
Nope, just another way to do it! Now if you really want to have some fun, why not try it both ways (or a few other ways not already mentioned) and benchmark the results to see what works best :)
Respectfully, Ligaya Turmelle


« previous php.general (#190983) next »