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

Reply via email to