Any ideas how i update a table but i still want to keep....

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

Any ideas how i update a table but i still want to keep....

Post by gasoga »

Hi ,

Im am creatin a helpdesk system and i need to keep track of who was logged to a call and the solutions that they came up with and if they solved the problem, if they dont solve it it gets assigned to a new person and so on until the problem is solved. I need to be able to update the calls_logged table to reflect this but if i update the table i lose the previouse inforamtion.
Any ideas on how i can keep track of what is happeneing to a specific call??
Thanx!
nincha
Forum Contributor
Posts: 191
Joined: Fri Mar 28, 2003 12:30 pm
Location: CA, USA

Post by nincha »

you can always creat two tables.. storing the new info on the main table while backing up the old info onto the second table
User avatar
dstefani
Forum Contributor
Posts: 140
Joined: Sat Jan 11, 2003 9:34 am
Location: Meridian Idaho, USA

Post by dstefani »

it sounds like you need a seperate table for the solutions.
Since you can have many attempted solutions for each one trouble ticket.

Call table:
Caller info and (suggestion) a foreign key for the help tech from your techs table.

Solutions table:
Solution ID and a foreign key of the Caller ID.

A one to many relationship:
One call to many solutions

You can find much reference of relationships.
One good book that is printed on very bad paper and binding is:
Build your own Database Driven Website using PHP & MySQL
http://www.sitepoint.com/article/228

I hope this leads you in the right direction.

- D
User avatar
Wayne Herbert
Forum Commoner
Posts: 34
Joined: Tue Apr 29, 2003 3:13 pm
Location: Houston, Texas

Post by Wayne Herbert »

Add a sequence number to the key of the table. Start with 999 as the first entry. When you have to add another call, write a new record in the table with the next lower sequence number 998. Then, when you do a select on problem_id or whatever key you use, you get all info for the call order newest to oldest.
Post Reply