pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marius Andreiana <marius@webdevgroup.com>
To: pgsql-php@postgresql.org
Subject: How to manage search results?
Date: 10 Dec 2001 11:27:56 +0200
Message-ID: <1007976478.8206.2.camel@aurora.wdg.ro> (raw)

Hi

I was wondering how others manage search results.

We do it now like this:
each user has a predefined table for holding the results (a list of
IDs). When user is created/deleted,
this table (query_results_$user_id) is created/deleted too. If this
table is deleted by mistake (by hand),
one cannot perform a search anymore.

problems:
* you have to remember to create/delete table each time user is
created/deleted (not too hard)
using a temporary table with aa unique name determined at runtime would
be better
* If there are more types of searches you run into problems.
results from deleted members are hold in the same table, so
when you go to search screen for normal members you'll
see there are x results.

Proposal so far: when going to search page check if there's a temporary
table name set to be used
for holding results for that search type (members, deleted_members, ...)
If not, determine a name (random, check if it already exists in db),
keep it in a session variable and create that table.

Any other ideas?

Thanks!
-- 
Marius Andreiana
Web Development Group, Inc.




view thread (6+ messages)  latest in thread

Message-ID: <1007976478.8206.2.camel@aurora.wdg.ro>
Permalink:  ../1007976478.8206.2.camel@aurora.wdg.ro/
Also on:    postgresql.org/message-id/1007976478.8206.2.camel@aurora.wdg.ro

 · 

reply

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-php@postgresql.org
  Cc: marius@webdevgroup.com
  Subject: Re: How to manage search results?
  In-Reply-To: <1007976478.8206.2.camel@aurora.wdg.ro>
  References: <1007976478.8206.2.camel@aurora.wdg.ro>

* 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