0

Hi,
I am having the table of the following details.

rollno subject standard
reg01 maths III
reg01 physics III
reg01 english III

This reg01 student has registered this courses. He can make changes this registered courses. How can i find the "updation"(or differences) of my table as the previous using php. No changes means ...the master should not get updation. If any changes means, the request should me sented. How to find it this ? Please help me out thanks in advance.

2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by ppetree
0

wouldn't you put a timestamp in the table and set its ON_UPDATE status so that anytime the row is modified the timestamp gets set to the current time?

then you could check that timestamp against the timestamps in the master.

but the bigger question is why are you having to update a 2nd table? That's sounds like a dangerous database design that will eventually cause you some big problems!

0

Hi,

you misunderstood my questions. Once again please read this. I am having only a single table.


I am having the table of the following details.

rollno subject standard
reg01 maths III
reg01 physics III
reg01 english III

This reg01 student has registered this courses. He can make changes this registered courses. How can i find the "updation"(or differences) of my table as the previous using php. No changes means ...my teacher should not get any request. If any changes means, the request should me sented. How to find it this ?

0

Then you would need two timestamps.

one timestamp would be the baseline (date/time of the last time you checked the table) and when you check it, you update this date/time.

one timestamp would be the users change (date/time when user changed a class). this timestamp would be automatically updated by the database (mysql?) when the row is changed.

0

No,
in simple words, i need to find the differences of my table. (current - before ) using php

0

If what you are looking for is what did the table look like before changes made by the user then you need to approach the problem differently.

Try drawing a data map. Show us what your table looks like before changes, what it will look like after changes and what the change was. Three simple diagrams.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.