Changeset 14919 for branches/beta/data/class
- Timestamp:
- 2007/06/26 12:00:09 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/beta/data/class/SC_Query.php
r14676 r14919 590 590 } 591 591 592 593 594 595 $this->BEGIN();596 597 598 599 600 601 602 603 604 605 $this->COMMIT();606 607 608 592 // auto_increment¤ò¼èÆÀ¤¹¤ë 593 function get_auto_increment($table_name){ 594 // ¥í¥Ã¥¯¤¹¤ë 595 $this->query("LOCK TABLES $table_name WRITE"); 596 597 // ¼¡¤ÎIncrement¤ò¼èÆÀ 598 $arrRet = $this->getAll("SHOW TABLE STATUS LIKE ?", array($table_name)); 599 $auto_inc_no = $arrRet[0]["Auto_increment"]; 600 601 // Ãͤò¥«¥¦¥ó¥È¥¢¥Ã¥×¤·¤Æ¤ª¤¯ 602 $this->conn->query("ALTER TABLE $table_name AUTO_INCREMENT=?" , $auto_inc_no + 1); 603 604 // ²ò½ü¤¹¤ë 605 $this->query('UNLOCK TABLES'); 606 607 return $auto_inc_no; 608 } 609 609 } 610 610 ?>
Note: See TracChangeset
for help on using the changeset viewer.