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 7794473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:47:09+00:00 2026-06-01T22:47:09+00:00

Is it possible to have a multi-dimensional table in mySQL I want to log

  • 0

Is it possible to have a multi-dimensional table in mySQL

I want to log users based on based on their ip, their user-agent and the session token they sent.

Something like this:

ip1
    user-agent1
        session token1
    user-agent2
        session token2
        session token3
ip2
    user-agent3
        session token4

I would like to avoid using serialize() as I’ve heard it would make the table less efficient and less portable.

  • 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-06-01T22:47:11+00:00Added an answer on June 1, 2026 at 10:47 pm

    It isn’t that you have a multi-dimensional table, but rather multiple tables.

    Table ips

    id INT
    ip VARCHAR
    

    Table useragents (links UA to IP)

    ip_id INT
    useragent VARCHAR(2048) (some large value)
    

    Table tokens (links users to tokens)

    id
    userid 
    token
    

    All three of the components above are linked together via their id columns into a table identifying sessions. Multiple ip_id may associate with a single token, which in turn associates multiple possible UA strings.

    It leaves the possibility that there can be identical UA strings for the same IP, but with multiple different session tokens from that same IP.

    Table sessions

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

Sidebar

Related Questions

Possible Duplicate: php multi-dimensional array remove duplicate I have an array like this: $a
Is it possible to have a relationship from a user table to a system
I have a MySQL table which contains a list of all possible products a
Is it possible to have a multi-line textbox (im using asp.net c#) where the
Is it possible to have a multi level dropdown menu by using the elements
Are multi-threaded CLR stored procs possible? I have a data-intensive task with lots of
Is it possible to have an association mapping a table to itself? e.g. Table:
In a multi-dimensional space, I have a collection of rectangles, all of which are
i have an multi-dimensional array which looks like $a[] = array('id' => '1', 'city'
In C#, i have created ArrayList using structures. so it creates multi dimensional array

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.