Questions about the maximum number of queries encountered

Source: Internet
Author: User
The problem with the maximum number of queries encountered
Data table Field 2

Name Num


Name word Gencun such as AA BB cc and so on names

num character Gencun a:4:{i:2009;s:1: "0"; I:2010;s:1: "0"; I:2011;s:1: "0"; i:2012;s:1: "1";}

This sequence field
After deserialization is
Array
' =>0 ',
' =>0 ',
' =>0 ',
' =>1 '
)
And the value is 1

Then the operation is to query out the top 10 records of NUM and the maximum value,

How to do it?

------Solution--------------------
If it is a MySQL database, it can only be removed after all, sorted by program
But if you have already asked for it in storage, you can use the MySQL function to precipitate

If it is a SQLite database, you can register a PHP function with it to do
------Solution--------------------
Saving JSON is a tragedy. Let's do it in PHP.
------Solution--------------------
Test the terminal judgment.
------Solution--------------------
All taken out for judgment
  • 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.