Re: How can I find database records that were NOT just updated
| From: | F�bio Ottolini | Date: | Sun, 19 Nov 2000 05:58:57 +0000 |
| Subject: | Re: How can I find database records that were NOT just updated | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26103@lists.php.net to get a copy of this message | ||
Don't you think it's a good idea to create a timestamp field on your table?
Then you can compare what's new and what's old and also what was modified,
inserted and so on. Every time that I think about a database that needs this
kind of match the only thing I can think of is a timestamp column. It solves
lots and lots of problems.
Best regards,
Fábio Ottolini
Eletronic.Net
----- Original Message -----
From: "Slavko Dervisevic" <slavkod@EUnet.yu>
To: <php-general@lists.php.net>
Sent: Sunday, November 19, 2000 3:00 AM
Subject: [PHP] How can I find database records that were NOT just updated
> add new field to table "updated"
> add, update set these fields to 1
> simple sql now finds all records not updated
> after display, just run new new query and set all updated to 0
>
>
> OK, let me first explain what I'm trying to do:
>
> I have a table with about 100 records. Each record has a unique ID.
> A script then adds records to this table, or updates the record if it
> already exists (based on the ID).
>
> I then need to get a list of all the records that were NOT just
> inserted or updated.
>
> Anybody have a more efficient way of doing this?
>
>
> =====================
> Slavko Dervisevic
> Agencija INSIDE
> http://www.unovomsadu.com/