INSERT and UPDATE page examples?

INSERT and UPDATE page examples?

am 23.09.2005 04:27:53 von abanks

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

Re: INSERT and UPDATE page examples?

am 23.09.2005 08:31:24 von Gnanavel S

------=_Part_4763_2708518.1127457084382
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

views with rules might help you.

On 9/23/05, A. Banks 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.

------=_Part_4763_2708518.1127457084382
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

views with rules might help you.

On=
9/23/05, A. Banks < abanks@insightbb.com">abanks@insightbb.com> wrote:
class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); =
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I need to construct a set of admin pages for a website so internal users ca=
n
INSERT and UPDATE data for a group of related tables.  I don=
t want to
re-invent the wheel on this and due to nested foreign key cons=
traints, it's

not so straightforward.


Here's my example:

Project >---------
proj_id   pkey
title     var=
char

Employees
-----------
empl_id   pkey
dept_id=
   fkey
name        va=
rchar


ProjEmployees (many employees on a project)
--------------
proj_id&nb=
sp;  pkey/fkey
empl_id   pkey/fkey

Department
-=
----------
dept_id   pkey
name     =
; varchar


Creating a COMPLETE PROJECT involves populating a=
ll 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 a=
dd
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 ProjEmploy=
ees)
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


---------------------------(en=
d of broadcast)---------------------------
TIP 2: Don't 'kill -9' the po=
stmaster



--
with regard=
s,

S.Gnanavel
Satyam Computer Services Ltd.

------=_Part_4763_2708518.1127457084382--