List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 25 2002 4:34am
Subject:Re: Temporary tables
View as plain text  
>hi all
>I',m wondering if temporary tables stay around longer then the page you
>use to create them if you create them with a php page. my thoughts were
>they do but mine doesn't for some reason. I've made a temporary table to
>query on a page that draws a pie chart out of the data in the temporary
>table but when I try to access it from that page there's nothing there.

Tables created with CREATE TEMPORARY TABLE disappear when the current
connection closes.  They also are visible only within the connection that
created them.

So:

- If you create the table from one page using a non-persistent connection,
   the connection will close when the script ends and the table will
   disappear and be unavailable to other pages.
- If you create the table from one page using a persistent connection, the
   connection will not *necessarily* close when the script ends.  However,
   there is no guarantee that a following page will get that same connection,
   in which case the table will not be visible even if it happens to still
   exist.
Thread
Temporary tablesJohn Coder25 Sep
  • Re: Temporary tablesPaul DuBois25 Sep
    • Re: Temporary tablesJohn Coder25 Sep
      • Re: Temporary tablesKeith C. Ivey25 Sep
        • Re: Temporary tablesPaul DuBois25 Sep
Re: Temporary tablesJohn Coder26 Sep