Re: How to create a new Table in prostgresql from a Webinterface
| From: | Robby Russell | Date: | Sat, 14 Aug 2004 21:12:58 +0000 |
| Subject: | Re: How to create a new Table in prostgresql from a Webinterface | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35712@lists.php.net to get a copy of this message | ||
On Sat, 2004-08-14 at 08:31, Michelle Konzack wrote:
> Hello,
>
> Never I have done this before (no need) but now I need to create a
> new table with some colums from a Webinterface and do not know how
> to do that.
>
> Please can anyone point me into the right direction ?
>
Well, CREATE TABLE is the type of sql command that you would issue.
You can do
$query = "CREATE TABLE foo (id SERIAL PRIMARY KEY, name TEXT);";
Then run this query through your php command of choice (pg_query, PEAR,
etc)
-Robby
--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
****************************************/
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc