 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
steeldevil
Joined: 12 Aug 2009 Posts: 2
|
Posted: Tue Aug 18, 2009 6:34 pm Post subject: [dataobject] insert date |
|
|
Hii,
I use the http://pear.php.net/manual/en/package.database.db-dataobject.php to interact with my database.
Now i have a timestamp field in a database table so, i tried many things but nothing seems to work the value is still the default (0000-00-00 00:00:00).
I tried many things from this page:
http://pear.php.net/manual/en/package.database.db-dataobject.intro-casting.php
but nothing seems to work
for example:
$this->startDate = DB_DataObject_Cast::dateTime();
$this->startDate = DB_DataObject_Cast::sql('NOW()');
....
the value is still 0000-00-00 00:00:00.
When i turn the debug level to 5 and read the query, the date field was not added to the query....
At the top of the page i see this message:
"This is experimental!, although it is documented, it currently only supports a limited amount of databases (send me fixes if you want it to support your favorite database), and the internal operations/API may change in the future.. "
I use Mysql... is there an other method i just want to insert a date.
I dont want to do it with a raw query because there are many date fields in the database. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|