Use of serial number self-increment key

Source: Internet
Author: User

Since the output sequence number is required in the template, it is not guaranteed to be sequential if it is extracted from the database.

In the template I use the Foreach Loop, and the manual sees the use of foreach

But I still did not learn the use of key from the manual. Try to use

As a result, but starting from 0.

I want to start from 1. Then the first thing I think about is whether the key can set the initial value, and no usage is found. Had to check the Internet. The result of a solution that I see is {$key +1}, that's great.

At the same time I looked up the manual to see Volist in this area has a powerful function, but has not been used.

Use of serial number self-increment key

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.