Re: design/copying a bunch of records

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: M Spreij <nemo(at)mechintosh(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: design/copying a bunch of records
Date: 2003-07-23 18:28:07
Message-ID: 200307231128.07025.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Martin,

> So I figured the best way was to copy the records from the
> admin-set to user-sets (but suggestions for other ways are very
> welcome!), and was wondering if there is a 'good' way to copy about
> 50 records to different tables every time you add a user account -
> the only way I can think of is write some loops in PHP. Better ways?
> TIA!

Yes ... the better way is to just have all products in one big table with a
column to indicate what user they belong to. And then to modify the PHP
query for each user so that it always includes both his and the admin's
products. The same approach should be used with other "user specific"
tables.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Barry Lind 2003-07-24 02:18:15 Re: psql and jdbc insert discrepencies
Previous Message Patrick Hatcher 2003-07-23 16:00:31 Re: Need clarifications......