1Insert_Id 2========= 3 4Returns the auto generated id used in the last query. 5 6Example 7....... 8 9.. code-block:: php 10 :linenos: 11 :emphasize-lines: 19 12 13 <?php 14 15 require_once 'dalmp.php'; 16 17 $user = getenv('MYSQL_USER') ?: 'root'; 18 $password = getenv('MYSQL_PASS') ?: ''; 19 20 $DSN = "utf8://$user:$password".'@127.0.0.1/test'; 21 22 $db = new DALMP\Database($DSN); 23 24 try { 25 $db->Execute('CREATE TABLE myCity LIKE City'); 26 } catch (Exception $e) { 27 echo "Table already exists.",$db->isCli(1); 28 } 29 30 $db->Execute("INSERT INTO myCity VALUES (NULL, 'Toluca', 'MEX', 'México', 467713)"); 31 printf ("New Record has id %d.\n", $db->Insert_id());