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

  • Home
  • SEARCH
  • 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 3438400
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:11:00+00:00 2026-05-18T08:11:00+00:00

I have a database, tvguide and these are the values: id bigint 255 UNSIGNED

  • 0

I have a database, tvguide and these are the values:

id bigint 255 UNSIGNED AUTO_INCREMENT
programme varchar 255 
default value (which is from another table
with list of programs, the only linked field that
is shared with other table):<b><a href="gossipgirl.php">Gossip Girl</a></b>
channel varchar 255
airdate DATETIME - actual airtime
displayair DATETIME (rounded-up datetime, e.g. programme that airs 1.59pm 
would be shown as 2.00pm, or 6.08pm as 6.10pm)
expiration DATETIME - when program finishes
episode VARCHAR 255 NULL - has null option if episode unknown
series VARCHAR 255
epno VARCHAR 255 - episode number
setreminder VARCHAR255 (shows "set reminder", sends email to user, but that's 
another thing to work on).

I want to insert a trigger into my database so that if a record is deleted, the ID auto-increment re-sets itself automatically?

Any ideas on how to accomplish this? I’ve done it manually so far but am looking at seeing what I can do with phpMyadmin when I delete the record.

BTW I made a copy of the table for backup purposes.

Thanks

  • 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-18T08:11:00+00:00Added an answer on May 18, 2026 at 8:11 am

    I agree with whitstone86’s comment that you can just “let it grow”.

    Having said that, to change the AUTO_INCREMENT at any time, you can just run an ALTER TABLE.

    Some pseudo code…

    SELECT MAX(id)+1 AS max_id_plus_one FROM my_table;
    
    ALTER TABLE my_table AUTO_INCREMENT = $max_id_plus_one;
    

    For production, race conditions might be an issue. However, if it’s just you puttering around in phpmyadmin, this should suffice.

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

Sidebar

Related Questions

I have database in which data is imported from the other table. if data
i have database from which i get data to my C# app using SQL
i have database with two values id and val so i want to ask
I have database, and in one the tables I need change the values of
I have database table with the follwoing fields: id, loan_no, installment, status which has
I have database backups taken from 2 machines(same database). ( about 75 tables) One
i have database table with few text fields which i use to filter data
I have database heavy operations happening, which adds around 10,000 records to my Database.
I Have database. I get my data from database with LINQ and save in
I have database in XML, which I need export to SQL Server DB. So,

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.