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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:11:54+00:00 2026-05-13T00:11:54+00:00

so i have 2 tables: -char (keeps information about the player) -special (its a

  • 0

so i have 2 tables:
-char (keeps information about the player)
-special (its a rank for top mobs, so each line from this table is a record of all the players that killed a mob and the total time)

here’s a summary i wrote:

##################
## table char: ##
#################
`char_id` - int(12) auto increment - primary key
`type` - varchar(18)
`color` - varchar(16)
---------------------------------------------------
#####################
## table special: ##
#####################
`id` - auto increment - primary key - just for keeping a number of events
`name` - varchar(24)
`time` - int(12) - the time the char's spent to kill the mob
`member1_id`- here is the char_id, it goes from 1 to 20 (until member20_id)
its a int(12), default is '0', so if there's only 3 members i would have something like:
`member1_id` = 1111111
`member2_id` = 2222222
`member3_id` = 1113123
`member4_id` = 0 (same for the rest)
---------------------------------------------------

i want to show every char from the member1_id, member2_id, memberN_id (a reminder: some values have 0 in member_id because there’s no player, so no data to show) and order by TIME

here’s a example:

Mob rank:

1 - Name: XYZ Guild - Time: 3 minutes
Member 1: 1111111 - Type: soldier - Color: blue
Member 2: 2222222 - Type: soldier - Color: red

2- Name: The FOO Guild - Time: 19 minutes
Member 1: 238381 - Type: Noob - Color: green
Member 2: 4444444 - Type: soldier - Color: red
Member 3: 549595 - Type: soldier - Color: green

the main thing its about the type of JOIN i should use, im kind like confused of how i can only get the data from where member_id is not 0 and also order by the TIME from SPECIAL

thank you very much

  • 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-13T00:11:55+00:00Added an answer on May 13, 2026 at 12:11 am

    You have a problem in the design of your database. Table “special” should be two tables, “special” and “special_members”. “Special” should have the columns “id”, “name”, and “time”. “Special_members” should have “special_id”, “member_id” and optionally a “member_order” column (if it’s important who’s number 1, number 2, etc) and “id” autonumbered column.

    With this normalized structure, you query will become easy.

    Without normalizing, you will need to use an INNER JOIN repeated 20 times and UNIONed together.

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

Sidebar

Related Questions

I have two tables in a MySql DB: items id (char) name (varchar) description
I have two tables like this: TABLE user( id CHAR(100) text TEXT ) TABLE
I have a maintenance application that has to turn enterprise data (from various databases/tables)
I have a two tables MovieStar ( name: char(15), address:varchar(40), gender:char(1), birthdate: date, rating:float
I have three tables: CREATE TABLE person (id int, name char(50)) CREATE TABLE eventtype
I have two large tables: products -------- id (char) (primary key) somefield1 (char) somefield2
I have two tables. TableA ( ID int, Match1 char, Match2 char, status char
Imagine I have two tables. Document int DocumentId (PK) char DocumentName Attribute int DocumentId
I have two tables where I was querying on a date column in each
Scenario: I have a table1(col1 char(5)); A value in table1 may '001' or '01'

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.