Into a "Uer" model, I have a field named "cod_serial" defined as
varchar(6) into database.

I use json to render the view. But when I parse the data to json
format (with utf8_encode($javascript->Object($users)))

The result is:

{"User":{"user_id":1, "name": "xxxx", "cod_serial":000008}}

It seems that cod_serial is integer, but it is varchar. The result
must to be (cod_serial with quotes):

{"User":{"user_id":1, "name": "xxxx", "cod_serial": "000008"}}

Why does it happen?

Thanks!!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to