PEAR::MBD2
| From: | Damian Bursztyn | Date: | Fri, 17 Nov 2006 17:14:03 +0000 |
| Subject: | PEAR::MBD2 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-25863@lists.php.net to get a copy of this message | ||
Hi, my Name s Damian from Argentina. Im tryn to work with MDB2 but have some
question. Mostly about working with dates.
Im working with SQL Server wich date type has the date and the time all
together. The question is this:
I have the a table events wich a column event_date of type date. I want to
know if there is some event for to day. To do this im doing:
$sSQL = "SELECT * " .
"FROM events " .
"WHERE event_date = :date ";
$dataTypes['event_date'] = 'date';
$db->bindParam('event_date', MDB2_Date::mdbToday());
$stmt = $db->prepare($sSQL, $dataTypes, true);
$result = $stmt->query();
$result->free();
Is this ok or i have to format event_date to special format or something?
MDB2 format the datetime converting it just to date?
Thanks
--
Todos los humanos profundos se deleitan en imitar a los peces
voladores jugando sobre las altas crestas de las olas. Consideran que lo
mejor
de las cosas es su superficie, lo que hay en la epidermis, sit venia verbo.
(Nietzsche)