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? > >

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 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

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-09 Thread Aziz Saleh
That was a bad copy/paste on his part. Syntax errors will not allow PHP to even run the code. On Fri, Jun 9, 2023 at 11:14 AM G. Franklin wrote: > My friends, > > Would not the syntax of "$query=$_GET['databasecolumn'[;" be part of the > issue? > > I believe the brackets should be closed like

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

2023-06-09 Thread G. Franklin
My friends, Would not the syntax of "$query=$_GET['databasecolumn'[;" be part of the issue? I believe the brackets should be closed like this, no? "$query=$_GET['databasecolumn'];" ~G. On Fri, 9 Jun 2023 at 10:53, Aziz Saleh wrote: > Read and understand these, should help you: > >

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

2023-06-09 Thread Aziz Saleh
Read and understand these, should help you: https://www.php.net/manual/en/language.types.array.php Basically its databasecolumnname get param is not defined (set) causing the query to fail also. On Fri, Jun 9, 2023 at 5:06 AM e-letter wrote: > Readers, > > Suppose: > >