Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [webmaster33] Missing DATETIME table field type! Several database tables affected

Quote Reply
Re: [webmaster33] Missing DATETIME table field type! Several database tables affected In reply to
I needed a datetime field in my postcards script. I added one. I also added a timestamp to the links table on several sites.

The overhead for adding one small "system" field (meaning it has a defined, fixed format in the MySQL core code) is almost trivial. Adding a couple of keywords (or just words to a title) to a link far outweighs the disk space and indexing requirements of this sort of field.

Also, by using several different fields, you can improve performance, and CPU is *MUCH* *MUCH* more expensive than disk space. It always has been, and always will be. You have one processor (usually) but you can attach an infinite number of disks (theoretically). Even on 4 processor systems, you have 4 CPUs, but you can install 12 RAID boxes with 3 terabytes of information.

If you need to sort links by the RELATIVE time they were added, just use SORT BY Add_Date, ID

The higher the ID, the later the link was added to the system.

This gets trickier with Mod_date, so you'd need to track the specific time a link was modified by using a separate field. Because "hits" get written to the link dynamically, you don't want to use a timestamp field.

Alex's suggestion of using an integer field, which stores the localtime() value is a good one. This can be converted to a date/time as needed, and it can also be sorted qickly to provide a relative relationship without incurring any special processing or conversions until needed.

Basically, you had a need or a desire, and asked a question. You got answers you didn't like like. Fortunately, there is a virtually trivial work around, adding a new field to the links table.

This is not the same as a request for a hook into the Admin system, a new field type "File" or configuration variable for "sort order". There was no quick/easy and portable work around for those. There is for Date/Time sorting -- especially if you add your own field which is managed by your own plugin.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread Missing DATETIME table field type! Several database tables affected webmaster33 9477 Aug 28, 2002, 3:18 PM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Alex 9325 Sep 5, 2002, 2:00 PM
Thread Re: [Alex] Missing DATETIME table field type! Several database tables affected
webmaster33 9335 Sep 6, 2002, 3:37 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
yogi 9307 Sep 6, 2002, 4:10 AM
Thread Re: [yogi] Missing DATETIME table field type! Several database tables affected
webmaster33 9314 Sep 6, 2002, 4:56 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9363 Sep 6, 2002, 5:06 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9265 Sep 6, 2002, 6:42 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9277 Sep 6, 2002, 6:53 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9284 Sep 6, 2002, 7:50 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9298 Sep 6, 2002, 7:54 AM
Post Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9268 Sep 6, 2002, 7:59 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
pugdog 9269 Sep 6, 2002, 8:09 AM
Post Re: [pugdog] Missing DATETIME table field type! Several database tables affected
webmaster33 9233 Sep 6, 2002, 8:22 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
yogi 9304 Sep 6, 2002, 5:10 AM
Thread Re: [yogi] Missing DATETIME table field type! Several database tables affected
webmaster33 9243 Sep 7, 2002, 4:16 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9240 Sep 7, 2002, 4:48 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9219 Sep 7, 2002, 9:35 AM
Post Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9204 Sep 7, 2002, 10:12 AM
Thread Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9242 Sep 7, 2002, 9:42 AM
Post Off topic again
Ian 9230 Sep 7, 2002, 10:19 AM
Post Re: [Alex] Missing DATETIME table field type! Several database tables affected
webmaster33 9139 Dec 28, 2002, 8:17 AM
Thread Re: [Alex] Missing DATETIME table field type! Several database tables affected
webmaster33 9164 Dec 29, 2002, 5:54 AM
Thread Re: [webmaster33] Missing DATETIME table field type! Several database tables affected
Paul 9120 Dec 29, 2002, 7:32 AM
Post Re: [Paul] Missing DATETIME table field type! Several database tables affected
webmaster33 9103 Dec 29, 2002, 7:51 AM