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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:05:33+00:00 2026-05-16T06:05:33+00:00

I have a MySQL table which has three columns: Authority | MapID | Time

  • 0

I have a MySQL table which has three columns:

Authority           | MapID                   | Time
---------------------------------------------------------
animuson@forums     | 000000000000000         | 45.6758
132075829385895     | 000000000000000         | 49.7869
qykumsoy@forums     | 000000000000000         | 44.45
439854390263565     | 000000000000000         | 50.761
user@forums         | 000000000000000         | 44.9
another@auth        | 000000000000000         | 46.123
bingo@nameo         | 000000000000000         | 47.4392

What I’m doing is that once you link your account, it changes the Authority from whatever authoirty name you were using to your account ID number. So if I link ‘animuson@forums’ and ‘qykumsoy@forums’ to my account, and my account ID number is ‘132075829385895’ then I would have 3 entries that are duplicated, because the primary key is Authority + Map ID. I’ll only ever be changing one authority at a time, but over multiple Map IDs, so I’m trying to figure out a way to just change the Authority to their user ID and if it’s a duplicate, select the lowest time and just delete the other one. Is something like this possible with MySQL or do I need to use PHP?

So, after linking both of those accounts, I would end up with this table:

Authority           | MapID                   | Time
---------------------------------------------------------
132075829385895     | 000000000000000         | 44.45
439854390263565     | 000000000000000         | 50.761
user@forums         | 000000000000000         | 44.9
another@auth        | 000000000000000         | 46.123
bingo@nameo         | 000000000000000         | 47.4392

The current MySQL command I’m using which just changes the authority:

UPDATE `tronner_times` SET `auth` = '{$ani->e->user->uid}' WHERE `auth` = '{$actual}'
  • 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-16T06:05:33+00:00Added an answer on May 16, 2026 at 6:05 am

    That sounds like a job for BEFORE UPDATE trigger.

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

Sidebar

Related Questions

I have a MySQL table (A) which has, amongst others, three columns named day,
if i have a table which has columns with fixed lenght, Will mySQL count
I have a MySQL table which has a product_id field (big integer) 1102330008 1102330025
I have a huge MySQL table which has its rows encoded in UTF-8 twice.
I have a table in MySQL 4.0 which currently has a year field as
I have a table which is being dynamically populated from MySQL. The table has
I have a MYSQL-Table which stores scores. Every time a user improves a new
I have a mysql table which columns are post_id and post_msg. Now I want
I currently have a table which has these columns: id (INT) parent_id (INT) col0
In my PHP application, I have a mysql table of articles which has the

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.