Ask for advice; use id to subtract the output difference for fields with the same content recently in phpsql

Source: Internet
Author: User
Tags php mysql
New users seek advice; phpsql uses id to subtract the output difference from the fields with the same recent content. php & nbsp; mysql databases use their IDs to subtract the output difference, for example: type field (id-1, field content 5); (id-8, field content 9); output 9-5 difference. Beginner & nbsp. Thanks & nbsp; thank you for your advice. use the id to subtract the output difference for fields with the same content recently in php SQL.
In the php mysql database, find the fields with the same content recently and subtract the output difference with their IDs, for example, the type field (id-1, field content 5 ); (id-8, field content 9); output 9-5 difference. Beginner details. Thank you.

Php SQL MySQL

Share:


------ Solution --------------------
I do not understand what you mean. I suggest you post
Create table ....;
Insert into table...; statement

And expected results, and briefly describe the algorithm logic.
------ Solution --------------------
Read data to the array and calculate the data as needed
------ Solution --------------------
At least you need to know how your data is organized.

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.