[PHP-DB] Re: use php variable within postgresql query

2023-06-12 Thread e-letter
Yes, aware but one step at a time, slowly(!) As a non-programmer, want to test ability to comprehend the concepts first, before security implementations. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] use php variable within postgresql query

2023-06-12 Thread e-letter
First, sorry for the mistake to type a sanitised version of code. Should have been: "$query=$_GET['databasecolumn'];" After some rtfm, confused as a non-computer-programmer why it is necessary to set the $_GET parameter. The overall simple scenario is to view a postgresql database in a series of

[PHP-DB] use php variable within postgresql query

2023-06-09 Thread e-letter
Readers, Suppose: $query=$_GET['databasecolumn'[; $anotherquery=pg_query($databaseconnection, 'SELECT * FROM databasename WHERE databasecolumnname="'.$query.';"'); Two errors are reported: PHP Notice: Undefined index: databasecolumnname PHP Warning: pg_query(): Query failed: ERROR: column