Jump to content


Photo

update all records at once?


  • Please log in to reply
3 replies to this topic

#1 klinmy

klinmy
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 18 March 2006 - 07:39 PM

i'm doing a form which the admin can enter a particular date for the system's users. Different users may have different dates which will be deducted by the current date in order to get the duration.

my question is, can i make a button which can update all the duration of the system's users in the database, so that the admin doesn't need to update the duration one by one when it enters a new year?

thanks

#2 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 18 March 2006 - 08:22 PM

I don't really understand your question, but if you want to go into the database and select all records, or a group a records, and adjust a date? by the same amount, or be a formula, then yes... you can do that.

#3 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 19 March 2006 - 01:04 AM

As AV1611 said, yes you can, but why bother? The durations can be calculated when required so no need to store such derivable data in the DB. By tomorrow they are going to be out of date.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#4 klinmy

klinmy
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 19 March 2006 - 05:13 AM

thanks alot.. i will try todo tht.

i need the duration, coz it involves in another calculation in other forms




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users