Received: from sandberg.webdevelopmentgroup.com ([207.197.204.138]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fBA9J5m86298 for ; Mon, 10 Dec 2001 04:19:05 -0500 (EST) (envelope-from marius@webdevgroup.com) Received: from aurora.wdg.ro (onyx.wdg.ro [193.231.212.69]) by sandberg.webdevelopmentgroup.com (8.9.3/8.9.3) with ESMTP id EAA32335 for ; Mon, 10 Dec 2001 04:19:05 -0500 Subject: How to manage search results? From: Marius Andreiana To: pgsql-php@postgresql.org Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Evolution/0.99.0 (Preview Release) Date: 10 Dec 2001 11:27:56 +0200 Message-Id: <1007976478.8206.2.camel@aurora.wdg.ro> Mime-Version: 1.0 X-Archive-Number: 200112/4 X-Sequence-Number: 779 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.