Re: pgexecute bind message error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check the example here: https://www.php.net/manual/en/function.pg-execute.php

If you remove the 3rd param from the last line it should work. That parm you use if you are adding parameters in your query (above example does).

On Mon, Jun 5, 2023 at 11:52 AM e-letter <inpost@xxxxxxxxx> wrote:
Readers,

PHP is being attempted to display data from postgresql to html web
page. So far read manual § 'pg_execute'.

Following code:

                        $databaseconnection=pg_connect("dbname=databasename
user=databaseuser password=databasepassword port=portnumber");
                        $databasepreparation=pg_prepare($databaseconnection,
"databasequery", 'SELECT something,something1 FROM databasetable');
                        $databaseexecution=pg_execute($databaseconnection, "databasequery",
array("query display"));


File 'apache2/error.log' shows:

"
PHP Warning:  pg_execute(): Query failed: ERROR:  bind message
supplies 1 parameters, but prepared statement
&quot;databasequery&quot; requires 0 in ...
"

Please what is my mistake?

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux