Date fields usage with DB
| From: | Nicolas Hoizey | Date: | Tue, 21 May 2002 14:46:10 +0000 |
| Subject: | Date fields usage with DB | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-1416@lists.php.net to get a copy of this message | ||
Hi DB users/hackers,
as I already said a few weeks ago, we are trying to hack SPIP (a CMS)
with PEAR DB so that it works on any db.
I have a few questions about date and time fields and functions usage
with PEAR DB.
I have to manipulate such data with unique queries in a project that
has to be compatible with several backends, the main being MySQL,
PostgreSQL, Oracle and SQL Server.
I can have some differences in the field types, but I need of course
to get and set the same data to and from PHP.
I wonder if anybody has already established a list of cross db field
types and functions.
Here are the main usages I will have :
- dates possibly before 1970 and after 2038
- usual dates manip: add, sub, interval, etc
- "fuzzy" dates: 2002-10-00 for october 2002 for example
- system date and time: "now()" in MySQL, "now" in PostgreSQL, etc
- ...
I think there are some of these things that have no direct solution,
but this may be done though an emulation as the sequences.
So my question is: how can I do all this? ;)
Regards,
-Nicolas
--
Nicolas "Brush" HOIZEY
Free PHP projects http://www.phpheaven.net
Veille tous azimuts http://www.gasteroprod.com
Clever Age http://www.clever-age.com