Skip to content

Commit b12f2cc

Browse files
author
Ed Rackham
committed
Added method to return the last insert ID as per request. Closes a1phanumeric#7
1 parent 6c89faa commit b12f2cc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

class.MySQL.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,11 @@ function ArrayResultsWithKey($key='id'){
307307
}
308308
return $this->arrayedResult;
309309
}
310+
311+
// Returns last insert ID
312+
function LastInsertID(){
313+
return mysql_insert_id();
314+
}
310315
}
311316

312317
?>

0 commit comments

Comments
 (0)