Code Script .co.uk

Home | Scripts | Tutorials | Disclaimer | Sitemap | Contact

   Previous Sql Insert Id
 

Reference / Php / Previous Sql Insert Id

Get the insert ID or autoincrement value of the previously executes mysql query. 


$sql_insert = "insert into sites values (NULL,'')";

$result = mysql_query ($sql_insert);

$siteid = mysql_insert_id();





Please note that a disclaimer applies to any code on this page.
 
   Actions
  Go Back
  Bookmark
  Print Page


   Menu
 
- Links
- Reference
     - Javascript
     - Mysql
     - Php
          - Calculate Date Yesterday
          - Database Backup
          - Ftp Upload
          - Gzip File
          - List Files In Directory
          - Previous Sql Insert Id
          - Send Email
          - Server Visitor Properties
          - Set Global Get And Post Variables
          - Sql Query Results
     - Standards
     - Windows Os
- Script Editors
- Tutorials
- Vbscript