Forum Moderators: coopster

Message Too Old, No Replies

Move row from one table to another

Help please!

         

Sub_Seven

6:32 pm on Aug 25, 2010 (gmt 0)

10+ Year Member



Hello people,

Could someone help me getting started on how to be able to move one row from one table to another, I have a form that sends data to a table called "applications", from there I need to create a link that allows admin users to send some of the rows inserted to a table called "active" and also the same scenario from the "active" table I need those same admin users to have the ability to send some rows to another table called "inactive", this is for the handling of people who apply for a job ("applications") to those who get hired ("active") and for those who are fired ("inactive").

Any help will be greatly appreciated, thanks.

Orangutang

8:47 pm on Aug 25, 2010 (gmt 0)

10+ Year Member



Hi Sub_Seven,

I'm not sure of your application so my suggestion may not be what you need but what about just one table called applications as you have with an extra column in it, active.

The form that sends data into applications, as is.

In Admin user interface have ability to update status of person in applications table.

Admin interface would need to retrieve person. When viewed have form which has check boxes for active or inactive. This sends the variable to php page which uses sql INSERT or REPLACE statement to update the row in db.

Before: db

person | active | address | etc | etc
abc | yes | 123 Str

After update: db

person | active | address | etc | etc
abc | no | 123 Str

As said not 100% if this helps or if its the best way but its what I'd try to do to update the status.

The other thing I'd do is as you've done, post it on webmaster world. :-)