The logical question of "grab seats": How to get the parts that can be helped and dismantled

Source: Internet
Author: User
$seat _parts = Array (' Stool leg ', ' stool leg ', ' stool leg ', ' stool leg ', ' chair back ', ' armrest ', ' armrest ');

In the database

seat_build 记录用户椅子的进度    user_id        total_step(完成椅子需要的步数)         done_step(已经完成的步数/部分)seat_build_record 表用来记录相关的帮和拆记录    user_id        to_user_id(关联seat_build中的user_id)    part_id(对应$seat_parts中的索引)    type(-1表示拆 1表示帮忙)

Rules:

座椅完成以后就不能在拆了拆的部分职能是在已经完成的部分中选

Problem:

对于seat_build中的某个用户来说,如何快速的获得帮和拆的相应的座椅部分的索引?思路或者具体的代码均可

Reply content:

$seat _parts = Array (' Stool leg ', ' stool leg ', ' stool leg ', ' stool leg ', ' chair back ', ' armrest ', ' armrest ');

In the database

seat_build 记录用户椅子的进度    user_id        total_step(完成椅子需要的步数)         done_step(已经完成的步数/部分)seat_build_record 表用来记录相关的帮和拆记录    user_id        to_user_id(关联seat_build中的user_id)    part_id(对应$seat_parts中的索引)    type(-1表示拆 1表示帮忙)

Rules:

座椅完成以后就不能在拆了拆的部分职能是在已经完成的部分中选

Problem:

对于seat_build中的某个用户来说,如何快速的获得帮和拆的相应的座椅部分的索引?思路或者具体的代码均可
  • 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.