Re: PDO and date(time)s [message #170567 is a reply to message #170561] |
Mon, 08 November 2010 16:40 |
Matthew Leonhardt
Messages: 9 Registered: November 2010
Karma:
|
Junior Member |
|
|
"Erwin Moller"
<Since_humans_read_this_I_am_spammed_too_much(at)spamyourself(dot)com> wrote in
message news:4cd81d34$0$34849$e4fe514c(at)news(dot)xs4all(dot)nl...
> Hi all,
>
> Until now I have always used adodb for database abstraction.
> (http://www.phplens.com/adodb/)
> Or database specific PHP functions.
> I thought it might be good/fun to try PDO for my next project.
> PDO doesn't offer full database abstraction, just 'database access
> abstraction', according to the specs on www.php.net.
>
> So far, everything in PDO seems to make sense, works as expected, etc,
> except: Where is the date and/or datetime handling?
> It is simply not implemented at all it seems.
I get your frustration, but I think at the root of it, you're talking about
a difference in SQL, not access. IF one RDBMS prefers/requires one date
format, and another prefers something else, there's nothing in PDO that will
help you build syntactically valid SQL for that.
By the same token, there's nothing in PDO that will be able to assist with
the correct syntax for row-limiting between MySQL, MSSQL, Oracle, etc.
(LIMIT, TOP, etc.)
I think what you're really after here is a SQL-abstraction layer. I've
built my own just for this purpose.
|
|
|