title: Continuous ID in different tables
body: <p>Here is the correction/update of my first post :)</p>
  
  <p>I have a website where i can add news. If i add a news-entry, it will create a database entry on table "news" with a unique id for each news-entry.</p>
  
  <p>In every news-entry, i can add multiple pictures and multiple text-sections. For each picture which i add, it will create a database entry on table "news_images" with a unique image_id (autoincrement) and with the id from the table "news" (so i know which image belongs to which news-entry) . Same procedure if i add a text-section.</p>
  
  <p>The problem that i have: The pictures and the text-sections in each news-entry are draggable, so i can change their position (up and down). I must save each position for every object in the database. For this i added now a new Table "news_imgid_txtid". But i still don't know how to add a continuous id..</p>
  
  <p>Example: </p>
  
  <ul>
  <li>I add a image in the news-entry(id 234). So the image_id in table "news_images" will be 62
  (autoincrement). </li>
  <li>in table "news_imgid_txtid" the value 62 should be
  written in row "id" (don't know yet how to do this but will find it
  out). </li>
  <li>I add a text-section in the news-entry(id 234). So the
  text_id in table "news_text" will be 18 (autoincrement) but should be 63 (don't know how
  to do this)</li>
  </ul>
  
  <p><a href="https://i.stack.imgur.com/wVz05.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wVz05.png" alt="enter image description here"></a></p>
  
  <p>Thanks for your help, Misch</p>