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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:11:34+00:00 2026-06-04T04:11:34+00:00

i have a table contains two colomns , the first is an ID and

  • 0

i have a table contains two colomns , the first is an ID and the second is text , like this

oneContent (ID,contentText)

i have another table

ioContents (IOID,oneContentID)

and i want to insert this message (” hi man i am WilliamRoma”) into the oneContent and then link it in the ioContents to the IOID =3

i can do that by inserting the message first in the oneContent table and then insert its ID to the ioContents , but how can i get its ID ? ? ? ,

one way to doing it is

SELECT ID FROM oneContent WHERE contentText = "hi man i am WilliamRoma"

but this is a bad way i think , what do u suggest that after inserting the message ,get its id?

ever ID is auto increment

  • 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-04T04:11:35+00:00Added an answer on June 4, 2026 at 4:11 am

    Look here: http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html

    I think you want LAST_INSERT_ID()

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

Sidebar

Related Questions

I have two tables, both with the same columns. The first table contains original
I have created a table with two columns. The first column contains the hyperlinks,
I have a table with two columns. The first (which contains a menu) should
I have a table that contains the columns: employer_id contact_id primary First two are
I have a table with a few thousand rows. The table contains two columns,
I have a table which is being dynamically populated, each row contains two textfields
I have two tables: a schedule table that contains information about how an employee
I have two tables called A and B . Table A contains request details
I have two tables with exactly the same fields. Table A contains 7160 records
I have two tables; A and B. Table A contains a column of GUIDs.

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.