PHP questions about extracting data from a field in a database

Source: Internet
Author: User
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 ']);
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.