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
"databasequery" requires 0 in ...
"
Please what is my mistake?