Back to the month index |
Back to the list index
|
Peter Samuel (psamuel@ind.tansu.com.au)
Thu, 10 Apr 1997 10:09:43 +1000 (EST)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: Peter Samuel: "Re: [mSQL] Real rounding, precision"
- Previous message: Joe Brown: "Re: [mSQL] Real rounding, precision"
- Maybe in reply to: Craig Riter: "[mSQL] Real rounding, precision"
- Next in thread: rossg@cpd.co.uk: "Re: [mSQL] Automatic Delete"
Date: Thu, 10 Apr 1997 10:09:43 +1000 (EST) From: Peter Samuel <psamuel@ind.tansu.com.au> Subject: Re: [mSQL] Automatic Delete Message-Id: <Pine.GSO.3.96.970410100806.1599C-100000@grizzly.ind.tansu.com.au>On Wed, 9 Apr 1997, Joshua J. Kugler wrote:
> > Could anyone tell me whether it is possible to delete data from the
> >database by setting some kind of time limit on the time the data is
> >stored in the database?
>
> As far as I know, I don't think so, because mSQL doesn't have a 'date'
> field type.
>
> What you could do is put the date, e.g. 04/09/1997 in a field when a record
> is added. Then you could write a script that would cycle through the data,
> splitting those elements in to three variables, then do something like:
>
> If (month < 5 AND day < 10 AND year = 1997)
> {delete where unique_id_field = $unique_id}}
> elsif (year < 1997) {delete where unique_id_field = $unique_id}
>
> Using this 'code', the example record entered above would be deleted, as
> would all records entered prior to April 10, 1997.
>
> As splintered as that is, I hope it helps!
>
mSQL 2.0B5 introduced a date type - though no-one really knows how to
use it yet. Even with this type of field you'd still have to have a
client that went through the table and DELETEd records older than a
cetain time period - the database won't do that itself.
Regards
Peter
----------
Peter Samuel peter@uniq.com.au
Technical Consultant or at present:
Uniq Professional Services Peter.Samuel@ind.tansu.com.au
Phone: +61 2 9206 3439 Fax: +61 2 9281 1301
--------------------------------------------------------------------------
To remove yourself from the Mini SQL mailing list send a message containing
"unsubscribe" to "unsubscribe" to msql-list-request@bunyip.com. Send a message containing
"info msql-list" to majordomo@bunyip.com for info on monthly archives of
the list. For more help, mail owner-msql-list@bunyip.com NOT the msql-list!
- Next message: Peter Samuel: "Re: [mSQL] Real rounding, precision"
- Previous message: Joe Brown: "Re: [mSQL] Real rounding, precision"
- Maybe in reply to: Craig Riter: "[mSQL] Real rounding, precision"
- Next in thread: rossg@cpd.co.uk: "Re: [mSQL] Automatic Delete"