Re: sessions and temporary tables

From: Date: Tue, 18 Jun 2002 13:44:54 +0000
Subject: Re: sessions and temporary tables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102688@lists.php.net to get a copy of this message
Temporary tables only exist for the duration of your script, with or without using mysql_pconnect(). If you want a MySQL table to remain, then don't make it temporary. Make it a regular table and then create a cron script that goes through and deletes tables that are more than X minutes/hours old. ---John Holmes... ----- Original Message ----- From: "Wilbert Enserink" <wilbert@pdd.nl> To: <php-general@lists.php.net> Sent: Tuesday, June 18, 2002 5:21 AM Subject: [PHP] sessions and temporary tables hi all, i have this problem: 1) on the start of each script I call session_start() 2) on my search.php page I query an info-table, put the results in a temporary table called $SID(=session_id()), and display the results. As a check I also query the table $SID and voila: the results were indeed stored in this temporary table. 3) On my next page there is this checkbox which says: search within these results. 4) If this checkbox is checked I query the $SID table rather then the info table. 5) but now I get this error: Table 'dbname.ed61c337640e2b0ab8f3ffccb63f8597' doesn't exist as a check I print $SID on each page. and always it is the same SID, which makes sense cause i'm still in the same session. My Q: howcome mySQL is not able to find this temporary table anymore.... It seems to have destroyed this table when leaving the search.php page, but that's a rather odd idea, cause I thought it maintained while the session was still active... any input is largely appreciated! thx and regards, Wilbert ------------------------- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl info@pdd.nl -------------------------

« previous php.general (#102688) next »