Hello,
Could somebody can confirm that have the same error as I?
On my PC defined by this:
- symfony 1.3 using propel
- Windows XP,
- PHP 5.2.8,
- MySQL 5.0.51a
I defined inside shema.yml table "zamowienia_towar":
zamowienia_towar:
_attributes: { phpName: ZamowieniaTowar }
id: { type: INTEGER, size: '11', primaryKey: true, autoIncrement:
true, required: true }
(...)
cena: { type: DECIMAL, size: '10', scale: '2', required: false,
defaultValue: '0.00' }
and after do in PHP:
$z = ZamowieniaTowarPeer::retrieveByPK(26);
$z->setCena("3.2");
$z->save();
I see in logs:
Feb 27 23:40:22 symfony [debug] {sfPropelLogger} prepare: UPDATE
zamowienia_towar SET `CENA`=:p1 WHERE zamowienia_towar.ID=:p2
Feb 27 23:40:22 symfony [debug] {sfPropelLogger} Binding '3.2' at
position :p1 w/ PDO type PDO::PARAM_STR
Feb 27 23:40:22 symfony [debug] {sfPropelLogger} Binding 26 at
position :p2 w/ PDO type PDO::PARAM_INT
but in database I see that cena is equal "3" not "3.2". It be treat as
integer not as float.
Have anybody some idea how to solve this problem, and how to store
full value of this decimal inside database?
Regards
Rafal
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---