pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedINSERT and UPDATE page examples?
2+ messages / 2 participants
[nested] [flat]
* INSERT and UPDATE page examples?
@ 2005-09-23 02:27 A. Banks <abanks@insightbb.com>
2005-09-23 06:31 ` Re: INSERT and UPDATE page examples? Gnanavel S <s.gnanavel@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: A. Banks @ 2005-09-23 02:27 UTC (permalink / raw)
To: pgsql-php
I need to construct a set of admin pages for a website so internal users can
INSERT and UPDATE data for a group of related tables. I dont want to
re-invent the wheel on this and due to nested foreign key constraints, it's
not so straightforward.
Here's my example:
Project
---------
proj_id pkey
title varchar
Employees
-----------
empl_id pkey
dept_id fkey
name varchar
ProjEmployees (many employees on a project)
--------------
proj_id pkey/fkey
empl_id pkey/fkey
Department
-----------
dept_id pkey
name varchar
Creating a COMPLETE PROJECT involves populating all of these tables but
users dont think ahead and understand the dependencies. A person adding
Employees to a Project will have to search for that Employee and then add
them. Sometimes they will suddenly realize that they need to create (insert)
a new Employee before they can add them to a Project (add to ProjEmployees)
and maybe then have to create (insert) a new Department, and so on...
Are there some pre-existing examples for how to go about this in PHP/Psql?
Thanks,
-Aaron
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: INSERT and UPDATE page examples?
2005-09-23 02:27 INSERT and UPDATE page examples? A. Banks <abanks@insightbb.com>
@ 2005-09-23 06:31 ` Gnanavel S <s.gnanavel@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Gnanavel S @ 2005-09-23 06:31 UTC (permalink / raw)
To: A. Banks <abanks@insightbb.com>; +Cc: pgsql-php
views with rules might help you.
On 9/23/05, A. Banks <abanks@insightbb.com> wrote:
>
> I need to construct a set of admin pages for a website so internal users
> can
> INSERT and UPDATE data for a group of related tables. I dont want to
> re-invent the wheel on this and due to nested foreign key constraints,
> it's
> not so straightforward.
>
>
> Here's my example:
>
> Project
> ---------
> proj_id pkey
> title varchar
>
> Employees
> -----------
> empl_id pkey
> dept_id fkey
> name varchar
>
> ProjEmployees (many employees on a project)
> --------------
> proj_id pkey/fkey
> empl_id pkey/fkey
>
> Department
> -----------
> dept_id pkey
> name varchar
>
>
> Creating a COMPLETE PROJECT involves populating all of these tables but
> users dont think ahead and understand the dependencies. A person adding
> Employees to a Project will have to search for that Employee and then add
> them. Sometimes they will suddenly realize that they need to create
> (insert)
> a new Employee before they can add them to a Project (add to
> ProjEmployees)
> and maybe then have to create (insert) a new Department, and so on...
>
> Are there some pre-existing examples for how to go about this in PHP/Psql?
>
>
> Thanks,
>
> -Aaron
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
--
with regards,
S.Gnanavel
Satyam Computer Services Ltd.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-09-23 06:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-23 02:27 INSERT and UPDATE page examples? A. Banks <abanks@insightbb.com>
2005-09-23 06:31 ` Gnanavel S <s.gnanavel@gmail.com>
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