How should I start? Ask for advice

Source: Internet
Author: User
I want to do a website now, PHP,

Data table has city, County, township, village I want home or village home can display the corresponding township or village introduction, backstage add content, ask this should be how a data structure, there is no corresponding system can refer to,
Please advise,,,, humbly


Reply to discussion (solution)

You can use DEDECMS to directly implement your function.

This is the relationship of a relative ah, according to the parent ID to determine where the child is, this basic can be, if you want unlimited classification, set a path

  Education      History Humanities and      Social Sciences      Professional skills      Ted speech   film      action action      --action--sci-fi action Sci-fi, sci-fi, sci-fi, Geneva sci-fi, comedy comedy and comedy, the comedy of the      idol      horror      war   TV      soap opera      costume drama      Korean      Gold Classic old film      History Review Arts      Entertainment      interview      financial      marriage      job Search      Draft      fashion      funny

This is the relationship of a relative ah, according to the parent ID to determine where the child is, this basic can be, if you want unlimited classification, set a path
Plain Text Code
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21st
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Education
Historical humanities
Social sciences
Science
Professional skills
Ted Speech
Movie
Action
Action 01
Action 02
Action 03
Action 04
Science fiction
Sci-Fi 01
Sci-fi 02
Sci-fi 03
Sci-Fi 04
Comedy
Comedy 01
Comedy 02
Comedy 03
Idol
Terror
War
TV
Operas
Costume drama
Drama
The old pieces of the golden Code
Four Classics
Historical Review
Entertainment
Entertainment
Interview
Financial
Marriage
Job
Draft
Fashion
Funny

Seek code, master please advise

The code is followed by your data
You give the data organization way, only then will have the corresponding code

Id,pid,name,description According to what you are writing now, the data sheet on these fields, PID is the administrative level of the ID, such as the village of the PID is its ID, township of the PID is the first level of county.

As for the township Home Show Township Introduction, village Home Show Village Introduction. That's too easy, huh? Just use the ID to description the corresponding record.

Unlimited classification table, easy to achieve stress-free

Easy and simple ...

  • Related Article

    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.