RE: [PHP] creating table help

From: Date: Fri, 19 Apr 2002 19:07:57 +0000
Subject: RE: [PHP] creating table help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93747@lists.php.net to get a copy of this message
> Warning: Wrong parameter count for pg_exec() in > /var/www/html/elkan/createtable.php on line 23 > The table, ghdsl could not be created > if (pg_exec($dbname, $query, $connect)) I assume pg_exec is a synonym for pg_query (the pg_exec command does exist in the PHP docs). According to the function docs http://www.php.net/manual/en/function.pg-query.php resource pg_query ( resource connection, string query) It only requires two parameters....your $dbname parameter is not acceptable. Since however you specified $dbname in the connect line you shouldn't need to specify the dbname again. So in theory if (pg_exec($query, $connect)) should do what you want, although you should change pg_exec to pg_query to keep in tune with the accepted functions. Also in the future...please ensure you mention what version of PHP you're using. It can help a great deal in helping to resolve your issues. Sincerely, Craig Vincent

« previous php.general (#93747) next »