includes/dbal.php
changeset 73 0a74676a2f2f
parent 21 663fcf528726
child 91 8079b0288e8e
--- a/includes/dbal.php	Sat Jul 21 11:28:59 2007 -0400
+++ b/includes/dbal.php	Sat Jul 21 18:12:10 2007 -0400
@@ -2,7 +2,7 @@
 
 /*
  * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.0 (Banshee)
+ * Version 1.0.1 (Loch Ness)
  * Copyright (C) 2006-2007 Dan Fuhry
  *
  * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
@@ -282,6 +282,16 @@
                                                      VALUES(\'security\', \'sql_inject\', '.time().', \'\',        \''.$query.'\', \''.$username.'\', \''.$_SERVER['REMOTE_ADDR'].'\');');
   }
   
+  /**
+   * Returns the ID of the row last inserted.
+   * @return int
+   */
+  
+  function insert_id()
+  {
+    return @mysql_insert_id();
+  }
+  
   function fetchrow($r = false) {
     $this->enable_errorhandler();
     if(!$this->_conn) return false;