php - Why in mysql store data like this a:6:{s:5:"title";s:43:} -


In the MySQL database, I get some data store like the following:

a: 6: {s: 5: of "title": 43: "fgjfh" of: 8: of "province": 6: "é ???? åº ??" Key: 4: of "City": 9: "§ § ¡¡¡¡ £ ?? £?"; S: 8: "location"; S: 6: "FHFgh"; S: 9: "beginners"; S: 11: "09-02 12:00"; S: 7: "Endime"; S: 11: "09-02 16:00";}

This is a PHP The array is if you want to change it, then look for the serialize ($ value) call in your code.

Update:

Maybe in your stored data (which is actually hash ) There are dynamic fields, and it was very difficult for the manufacturer or

but you should consider reconsidering your schema and making the right (3 NF). In this case you will have at least one table that can be like :

  Create table data (ID primary priority, or serial if your database supports This title is not referred to as VARCHAR, - or TEXT province_ID INTEGER, or the provinces table is not referred to in the city, INTEGER, zero - - or cities table location VARCHAR reference, I do not really know that this field starts the time TIMESTAMP, End time TIMESTAMP);   

And of course, you will need the provinces and cities tables. With this schema you can use the database instructions to work with stored data if you need it.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -