Re: pgexecute bind message error
| From: | Aziz Saleh | Date: | Tue, 06 Jun 2023 01:47:27 +0000 |
| Subject: | Re: pgexecute bind message error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328212@lists.php.net to get a copy of this message | ||
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@gmail.com> 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
> "databasequery" requires 0 in ...
> "
>
> Please what is my mistake?
>