Skip site navigation (1) Skip section navigation (2)

Re: [PHP] temp tables

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Cima <ruel(dot)cima(at)facinf(dot)uho(dot)edu(dot)cu>
Cc: php-general(at)lists(dot)php(dot)net, pgsql-novice(at)postgresql(dot)org
Subject: Re: [PHP] temp tables
Date: 2005-04-28 04:13:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Cima wrote:
> hi,
> im working with php 4 and postgresql 8 and in my php script id like to create a temp table on my database server. how do i do this? how do i verify it was created?

Well if the creation fails pg_query will throw an error. However temp 
tables are only good for the life of the connection (script in this 
case). You will probably want to consider that.


Joshua D. Drake

> i tried the following:
> $sql = "create temp table s_info(a int, b text) on commit delete rows ";
> pg_query($dbh,$sql);
> $dbh is my connection.
> any help will be highly appreciated.

Your PostgreSQL solutions provider, Command Prompt, Inc.
24x7 support - 1.800.492.2240, programming, and consulting
Home of PostgreSQL Replicator, plPHP, plPerlNG and pgPHPToolkit /

In response to

pgsql-novice by date

Next:From: CimaDate: 2005-04-28 04:45:05
Subject: temp tables
Previous:From: Richard LynchDate: 2005-04-28 03:50:44
Subject: Re: [PHP] temp tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group