Re: [PHP-CVS] cvs: php4 /pear/Cache/Container db.php
[email protected] (Chuck Hagenbuch) Fri, 2 Mar 2001 10:44:44 -0500
| Newsgroups | php.pear |
|---|---|
| Message-ID | <[email protected]> |
Quoting Ulf Wendel <[email protected]>: > - the fieldname "data" is a reserved word in old MySQL versions, > changed to "content" To avoid future problems with reserved words, portability, etc., how about standardizing on this db schema: CREATE TABLE Cache ( cache_ID varchar(32) NOT NULL DEFAULT '', cache_Content mediumtext NOT NULL DEFAULT '', cache_Expires int(9) NOT NULL DEFAULT 0, cache_Changed int, INDEX(cache_Expires), PRIMARY KEY(cache_ID) ) I realize there will be code changes necessary to deal with changing the timestamp field to an int (in which we'd just store a unix timestamp), but I think it's worth it so that we avoid portability problems between various databases that either might not have timestamp fields, call them datetime, or implement them differently... -chuck -- Charles Hagenbuch, <[email protected]> "We have no fuel on board, plus or minus 8 kilograms." -A NASA scientist