From: Andy Lewis <alewis@mpsi.net>
Subject: Complex table/query
Date: Mon, 1 Jun 1998 09:59:59 -0500 (CDT)
Message-ID: <Pine.LNX.3.95.980601093055.16097A-100000@shell.mpsi.net> (raw)
I have the following info to store in a DB:
[1] Keep a record of category items as well as owner name, street, state,
zip..etc ....
[2] Keep a running tab on the number of items overall in the DB
[3] Keep a running tab on the number of items overall in the DB by state.
I am allowing the viewer to first select the state and then the city and finally
the category. Once they arrive at the category page I want to show them the
number of items that are in the DB for that state, city and category.
I am using PHP/Postgres to make a <select></select> statement that will show the
categories, of which there are around 115. The obvious 50 states....
I can build this ridulious SQL statement that just eats the hell out of the
processor.
Does anyone have any ideas how I can query/build this thing?
Thanks
Andy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: alewis@mpsi.net
Subject: Re: Complex table/query
In-Reply-To: <Pine.LNX.3.95.980601093055.16097A-100000@shell.mpsi.net>
References: <Pine.LNX.3.95.980601093055.16097A-100000@shell.mpsi.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox