Пример #1
0
 /**
  * Creates a new sql_generator.
  * @param moodle_database $mdb The moodle_database object instance.
  * @param moodle_temptables $temptables The optional moodle_temptables instance, null by default.
  */
 public function __construct($mdb, $temptables = null)
 {
     $this->prefix = $mdb->get_prefix();
     $this->reserved_words = $this->getReservedWords();
     $this->mdb = $mdb;
     // this creates circular reference - the other link must be unset when closing db
     $this->temptables = $temptables;
 }
Пример #2
0
 /**
  * Creates new moodle_temptables instance
  * @param moodle_database $mdb An instance of moodle_database.
  */
 public function __construct($mdb)
 {
     $this->mdb = $mdb;
     $this->prefix = $mdb->get_prefix();
     $this->temptables = array();
 }