PHP questions about extracting data from a field in a database
This post was last edited by pengjixin123 on 2014-07-14 14:42:38
Originally, my Site has a table in the background, is from the database of multiple fields output field. Now that the database structure has changed, a few data are all fused in a single field. Now it is time to read the data from a field, how should this code be written? I'll post the code.
Previous code: There are 8 fields that hold the data separately.
?
Now there is only one field: data, all of the 5 fields are fused into a single field. How should I write the code output on the foreground table now?
Data type stored in
A:9:{s:4: "
Time"; I:1405306402;s:4:"
nameS:6: "New Morning"; S:5: "
URL"; s:1:"-"; s:4:"
Word"; s:1:"-"; S:5:"
RPage"; s:29:" http://www.baidu.com/test.html "; s:5:" Cpage "; s:1:"-"; s:2:" IP "; s:15:" 117.151.180.150 "; s:7:"
ip_city"; S:31:" Mobile "in Beijing, Beijing, China"; s:4: "Miao"; s:1: "5";}
------Solution--------------------
$row = Unserialize ($row [' data ']);