Logic question of "getting a seat": how to obtain the helper and detachable parts

Source: Internet
Author: User
$ Seat_partsarray (& #039; pair leg & #039;, & #039; pair leg & #039;, & #039; pair leg & #039;, & #039; legs & #039;, & #039; chair back & #039;, & #039; handrail & #039;, & #039; handrail & #039 ;); {code...} in the database ...} rule: {code ...} question: {code ...} $ seat_parts = array ('twenty leg ', 'chair back', 'handrails', 'handrails ');

Database

Seat_build record the progress of the user chair user_id total_step (number of steps required to complete the Chair) done_step (number of completed steps/Part) the seat_build_record table is used to record related help and split records user_id to_user_id (associated with user_id in seat_build) part_id (corresponding to the index in $ seat_parts) type (-1 indicates split 1 indicates help)

Rules:

After the seat is completed, part of the split function cannot be selected.

Problem:

For a user in seat_build, how can I quickly obtain the index of the corresponding seat section for help and removal? The idea or specific code can be used.

Reply content:

$ Seat_parts = array ('twenty leg ', 'chair back', 'handrails', 'handrails ');

Database

Seat_build record the progress of the user chair user_id total_step (number of steps required to complete the Chair) done_step (number of completed steps/Part) the seat_build_record table is used to record related help and split records user_id to_user_id (associated with user_id in seat_build) part_id (corresponding to the index in $ seat_parts) type (-1 indicates split 1 indicates help)

Rules:

After the seat is completed, part of the split function cannot be selected.

Problem:

For a user in seat_build, how can I quickly obtain the index of the corresponding seat section for help and removal? The idea or specific code can be used.

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.