Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6591417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:25:14+00:00 2026-05-25T17:25:14+00:00

Not sure really what to call it. But in my mysql database I have

  • 0

Not sure really what to call it. But in my mysql database I have tons of values like this :

 a:2:{i:5;s:10:"likes";i:10;s:10:"likes";}
 a:3:{i:5;s:10:"likes";i:10;s:10:"likes";i:11;s:10:"likes";}

I was under the assumption this is a form of an array and I have seen this before in another databse so I figured it was pretty standard, but kinda stumped now and my question is what would be a query to retrieve the largest of these arrays. so that a:MAXNUM{“likes”;} is returned.

If you need me to explain more please ask.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:25:14+00:00Added an answer on May 25, 2026 at 5:25 pm

    This is serialized strings. You can unserialize them and they will be objects or arrays. When you unserialize that strings you can simply calculate likes count and max count by yourself. If serialized string was an array you can just do that with simple PHP functions if you used that.

    Strings you provide seems to be PHP serialized strings. More about serialization in PHP you can find here.

    Anyway you can’t unserialize that strings using only MySQL. You need server-side laguage to do that, PHP for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not really sure what to call this. But basically I want to be
I'm not really sure how to ask this question, but I'll do my best.
I have a number of atomic classes (Components/Mixins, not really sure what to call
I'm not really sure what to call this, because static constructor seems to convey
I'm not sure it's really a polymorphism question but anyway... So I have an
OK, not really sure if this is possible but thought I'd ask anyway :)
So i'm not really sure why this is happening but I'm running through some
First of all, I'm not really sure if this should be on stackoverflow but
I'm really not sure how to ask this question but I need a way
Not sure if I really am on the right forum, but if not, just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.