Login | Register
My pages Projects Community openCollabNet

Discussions > dev > setDate(null) > Reply to message

propel
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author Franck Poussiere <fpoussiere@sedona.fr>
Full name Franck Poussiere <fpoussiere@sedona.fr>
Date 2008-09-18 06:59:34 PDT
Message Hi,

I'm using propel 1.3 and try to unset a date field from a record of my
MySQL database (this is a datetime field).

i do something like :

$object = myObjectPeer::retrie​veByPK($id);
$object->setDateEnd(null);
$object->save();

but the request does not succeed because of the null value of the end
date.

The response is : Unable to execute UPDATE statement. [wrapped:
SQLSTATE[HY093]: Invalid parameter number: parameter was not defined]

Where is my mistake ?

Regards.

--
Franck Poussière
Tel : 01 44 94 89 90
GSM : 06 73 67 63 39