Skip site navigation (1) Skip section navigation (2)

Re: Postgres access using PHP3

From: John Poltorak <jp(at)eyup(dot)org>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres access using PHP3
Date: 2001-01-19 21:32:48
Message-ID: 20010119213247.D85@eyup.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Fri, Jan 19, 2001 at 04:13:21PM -0500, Andy Holman wrote:
> John,
> Not sure exactly what you mean. Do you know the
> column names to the table in the db or is that
> what you are trying to get?  Or do you mean you
> are just trying to print out the results of a
> query into a drop down list?
>
> Let me know and I will give you some code.

Hi Andy,

I'm going to attach some sample PHP code which hopefully illustrates
what I mean...

The the first selection offers a list of monthnames. What I want to
do instead is provide a list of values from a table ie such as towns.
The selected town will then be used for the WHERE clause in a subsequent
SELECT.

I hope you understand what I'm getting at.


> --Andy
>
>
>
> John Poltorak wrote:
> >
> > I'm trying out PHP3 for accesing Postgres through a Web interface
> > and am having a problem coming up with the correct code...
> >
> > I'd like to retreive a list of values for a key field and then
> > provide this to the user in the form of a drop down selection list,
> > but I can't work out how to get the values into an array.
> >
> > I must be missing something as I can't a way of doing it...
> >
> > Any sample code snippets would be much appreciated.
> >
> > --
> > John

--
John

In response to

Responses

pgsql-novice by date

Next:From: Albert REINERDate: 2001-01-19 22:09:31
Subject: Index on function referring other table
Previous:From: Andy HolmanDate: 2001-01-19 21:13:21
Subject: Re: Postgres access using PHP3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group