Hi Andrew, Oh, I feel SO stupid! I 'forgot' that line in my code! Sigh . . . I've just got a big serving of humble-pie!
I probably would have stared at that code for hours without noticing it. Thanks! (btw, nice name, eh?) Regards, Andre On Wednesday 02 October 2002 09:53 am, Andrew Brampton wrote: > It appears to me you are not actually executing the SQL you are storing in > the varible. > > Did you accidently miss that out of your email? > > I would supply you with more information but I don't know how to use > PostgreSQL, but since you are coding with it, I guess you should be able to > figure out the correct command > > Andrew > ----- Original Message ----- > From: "Andre Dubuc" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, October 02, 2002 2:44 PM > Subject: [PHP] Using PHP to create tables? > > > In order to get my site on-line, I need to upload all my files, and > > create > > a > > > few PostgreSQL tables that the scripts rely upon. > > > > I've created a script that should create these tables, but in testing it, > > nothing happens - no tables are created. I wondering whether it's even > > possible to create these tables from php? > > > > The other possibility is to use pg_dump, but again, wouln't that require > > that > > > the tables already exist on the server? > > > > So, I guess my question is: can I use php to accomplish these tasks, or > > do > > I > > > have to have access to psql (server-side)? > > > > Here's the script I've created: > > > > <?php > > include("dbc.php"); /* db connection script to pre-existing db on > > server*/ > > > $ct = "CREATE TABLE dip ( > > rid serial int4 NOT NULL, > > rfname varchar(50) NOT NULL, > > rsname varchar(50) NOT NULL, > > rm1name varcahr(50), > > rm2name varchar(50), > > rm3name varchar(50), > > rinit varchar(8), > > rnee varchar(50), > > rcity varchar(50), > > rprov varchar(50), > > rcountry varchar(50), > > rdate date, > > rsponsor int4, > > radopt int4, > > rpix varchar(50), > > rproduct varchar(50), > > rplacement varchar(50), > > robid int4, > > rmemid int4, > > rbook text, > > rconfirm int4, > > rupload varchar(200) > > )"; > > > > ?> > > > > Sorry for the real 'newbie' question here, but this is something I've > > never > > > done, so I'm going in totally blind. I'd greatly appreciate any advice > > concerning what to do, or watch out for. > > > > Tia, > > Andre > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php