title: Create slug to include id and title when insert record - php MySQL
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6932339/access-auto-increment-value-during-insert-into-statement">Access Auto-Increment Value During INSERT INTO Statement</a>  </p>
  </blockquote>
  
  
  
  <p>I would like to generate the slug for my URLs upon creating the pages to store in the database. The slug should be <code>title-id</code> (e.g <code>titlename-234</code>). I already have the function to strip the title but how can i get the id before inserting the record? </p>
  
  <p>Many thanks in advance </p>