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

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

2023-06-12 Thread Michael Oki
Meanwhile, you should probably use prepared statements to avoid SQL injection. On Mon, 12 Jun 2023 at 16:03, e-letter wrote: > First, sorry for the mistake to type a sanitised version of code. > Should have been: > "$query=$_GET['databasecolumn'];" > > After some rtfm, confused as a

[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 Karl DeSaulniers
Hi, I am assuming this is just a typo in your post and not your code, correct? (see quoted text below) If not, then try the other bracket? $query=$_GET['databasecolumn']; > On Jun 9, 2023, at 4:05 AM, e-letter wrote: > > $query=$_GET['databasecolumn'[;

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

2023-06-12 Thread Karl DeSaulniers
Oh I see now I am late to the conversation. Slow email load. Carry on. > On Jun 12, 2023, at 1:42 PM, Karl DeSaulniers wrote: > > Hi, > I am assuming this is just a typo in your post and not your code, correct? > (see quoted text below) > If not, then try the other bracket? > >