Well, It will be up to someone else to determine whether there is a way to persist a connection in PHP. Going from the idea that you cannot persist a connection, I reccomend you name the normal table based on something unique to the individual user, like their IP, the time, or something like that. That way you never have to worry about duplicate tables from multiple users. Also, make sure you have a mechanism in place to periodically destroy the old tables in case your PHP stops working before it does, otherwise you could get a very bloated database.
Mike Hillyer -----Original Message----- From: Dan [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 4:09 PM To: [EMAIL PROTECTED] Subject: 'Persistant' temporary tables Hi all. Hi spam filter. SQL. Query. I'm teaching myself PHP while building a graphing engine for my work. When a client logs in, I want to make a temporary table with the primary keys of the last 3 months worth of their data. I will then be averaging the data and using JPGraph (which is quite cool: http://www.aditus.nu/jpgraph/ ) to product graphs. The graphs will span multiple pages, and I'm pretty sure I can't keep the connection open to keep the temporary table in existance, as each graph is rendered in a separate 'page': echo "<img border=\"0\" src=\"graph.php?start=3&stop=7&title=Graph 2\" width=\"300\" height=\"200\">"; So I'd like to either keep the connection open across multiple php pages if possible, or just create normal tables and then delete them when I'm done. But the 2nd way would mean I'd have to check for the existance of the table before making it, in case someone else is logged in and already has their own tmp tables... But I don't know how to check for the existance of tables. How should I go about this? Thanks in advance! Dan --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php