How can I seralilze a value in C# to store in a mySql database that WordPress can deserialize? -
i'm building app updates wordpress database; wordpress stores serialized values in of fields. need serialize values , store them in wordpress wordpress can still deserialize them normal, if data entered directly in wordpress.
does know how this?
here's example of value stores serialized data in mysql: _voucherlocations = a:5:{i:0;s:3:"all";i:1;s:0:"";i:2;s:0:"";i:3;s:0:"";i:4;s:0:"";}
all entered in wordpress form "all" when enters "all" in winforms form, has stored same way seen above in mysql database theme i'm using in wordpress recognizes , can use it. hope clear.
i'm using c# entity framework 5 , latest mysql data adapater provided microsoft in winforms app. btw if , gets exceptions when trying insert, update or delete operations, it's because entity framework changes identity integer in mysql unasigned decimal; had manually go in entire entity framework generated code , change wrong data declarations bigint unsigned decimal. heads trying it.
php has special function to serialize , deserialize data, not json. know 1 library can serialize , deserialize data in .net: csphpserial
Comments
Post a Comment