Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1120
 
1290
 
1290
 
mysql.php
_> 11 <?php
  22 /*
<> 3 -  $Id: mysql.php 1120 2006-11-09 16:43:55Z hpdl $
   3+  $Id: mysql.php 1290 2007-03-01 19:36:08Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2006 osCommerce
   8+  Copyright (c) 2007 osCommerce
99 
  1010   Released under the GNU General Public License
  1111 */
     
 !
183183     }
  184184 
  185185     function nextID() {
<> 186 -      if ($id = @mysql_insert_id($this->link)) {
   186+      if ( is_numeric($this->nextID) ) {
   187+        $id = $this->nextID;
   188+        $this->nextID = null;
   189+
187190         return $id;
<>  191+      } elseif ($id = @mysql_insert_id($this->link)) {
   192+        return $id;
188193       } else {
  189194         $this->setError(mysql_error($this->link), mysql_errno($this->link));
  190195 
     
 !
200205       return mysql_affected_rows($this->link);
  201206     }
  202207 
<> 203 -    function startTransaction() {
   208+    function startTransaction($logging = false) {
   209+      if ($logging === true) {
   210+        $this->logging_transaction = true;
   211+      }
   212+
204213       if ($this->use_transactions === true) {
  205214         return $this->simpleQuery('start transaction');
  206215       }
     
 !
209218     }
  210219 
  211220     function commitTransaction() {
<>  221+      if ($this->logging_transaction === true) {
   222+        $this->logging_transaction = false;
   223+        $this->logging_transaction_action = false;
   224+      }
   225+
212226       if ($this->use_transactions === true) {
  213227         return $this->simpleQuery('commit');
  214228       }
     
 !
217231     }
  218232 
  219233     function rollbackTransaction() {
<>  234+      if ($this->logging_transaction === true) {
   235+        $this->logging_transaction = false;
   236+        $this->logging_transaction_action = false;
   237+      }
   238+
<_ 220239       if ($this->use_transactions === true) {
  221240         return $this->simpleQuery('rollback');
  222241       }