From: | webmaster <webmaster(at)harbornet(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | creating table w/ php help |
Date: | 2002-04-19 10:42:28 |
Message-ID: | 3CBFF494.E408CF77@harbornet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm very new to php and PostgreSQL. I keep getting the following error
when I try to create a table:
Warning: Wrong parameter count for pg_exec() in
/var/www/html/elkan/createtable.php on line 23
The table, ghdsl could not be created
Here is the code I'm using:
<?php
// set variables
$tablename = "ghdsl";
$dbname = "testingdb";
$user = "testinguser";
$password = "xxxxxx";
$connect = "pg_connect($dbname, $user, $password)";
$query = "CREATE table $tablename (id INT UNSIGNED NOT NULL
AUTO_INCREMENT PRIMARY KEY, ip TEXT, customer TEXT, dslphone TEXT, date
TEXT, vpivci TEXT)";
if (pg_exec($dbname, $query, $connect))
{
print ("The table, $tablename was successfully created");
} else {
print ("The table, $tablename could not be created");
}
?>
thanks for any help.
From | Date | Subject | |
---|---|---|---|
Next Message | Tille, Andreas | 2002-04-19 11:33:30 | Precompiled Windows version? |
Previous Message | Yury Don | 2002-04-19 09:28:18 | pltcl bug in 7.2? |