> 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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to