Changeset 8993 for extensions
- Timestamp:
- Jan 30, 2011, 10:32:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCTables.class.inc.php
r8992 r8993 45 45 public function __construct($tables) 46 46 { 47 $this-> tables = $tables;47 $this->setTables($tables); 48 48 } 49 49 … … 55 55 56 56 57 /* 58 create tables 59 $tables_def is an array of SQL CREATE queries 60 61 return true if everything is ok, otherwise tablename 62 */ 63 public function create($tables_def) 57 public function setTables($tables) 58 { 59 $this->tables = $tables; 60 } 61 62 /** 63 * create tables 64 * 65 * @param Array $tablesDef : array of SQL CREATE queries 66 * @return Bool : true if everything is ok, otherwise tablename 67 */ 68 public function create($tablesDef) 64 69 { 65 70 //deleting tables if exists 66 71 67 $this->drop( $tables_def);68 69 for($i=0;$i<count($tables _def);$i++)70 { 71 $result=pwg_query($tables _def[$i]);72 $this->drop(); 73 74 for($i=0;$i<count($tablesDef);$i++) 75 { 76 $result=pwg_query($tablesDef[$i]); 72 77 if(!$result) 73 78 {
Note: See TracChangeset
for help on using the changeset viewer.