On the location of data lookup after table

Source: Internet
Author: User

I am now splitting the product table by user ID, and when I view the Product detail page, the user id+ Product ID must be in the URL link to navigate to the table where the product is located, and then read the information.

I do not want to take two parameters in the URL, I want to merge the user id+ Product ID into one parameter (or other side test), so we need an algorithm to the user id+ Product ID processing, but do not know how to do

Reply content:

I am now splitting the product table by user ID, and when I view the Product detail page, the user id+ Product ID must be in the URL link to navigate to the table where the product is located, and then read the information.

I do not want to take two parameters in the URL, I want to merge the user id+ Product ID into one parameter (or other side test), so we need an algorithm to the user id+ Product ID processing, but do not know how to do

User ID 12, Product ID 1200, the final ID is 12b1200, B is the meaning of belong, it doesn't matter, separate on the line
What algorithm ah, really ... Do not look good, not tall on the use of what 16 18 20 50 in the process of what to do under the link, see the Code of people will feel good NB

Do the cache, find the corresponding data

Just make it into a JSON form. http://url/?id={' uid ': ' PID ': 1200}, so the background processing is also convenient.

Or you just have to be ruthless, all the parameters are encapsulated in JSON.
Http://url/?par={' a ': ' xx ', ' B ': ' XX ' ...}

Dizzy, back to edit the third time, really addictive
There is also a solution, is to make a table to specifically record a user released the several products, this way the details page just need to load the product ID, and then use the Product ID to link the table to find the user ID, and then splicing the library name to find the product details.
Of course there is a premise that the product ID is unique

  • 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.