Database::query PHP Method

query() public method

SELECT queries should use getOne, getRow or getRows.
public query ( $sql ) : resource | false
return resource | false
    public function query($sql)
    {
        return $this->doQuery($sql);
    }

Usage Example

Example #1
0
 /**
  * Migrate form legacy column set editor.
  *
  * @return void
  */
 private function migrateFromLegacy()
 {
     if (!$this->database->fieldExists('bootstrap_grid', 'tl_content') && $this->database->fieldExists('columnset_id', 'tl_content')) {
         $this->database->query('ALTER TABLE tl_content ADD bootstrap_grid int(10) unsigned NOT NULL default \'0\';');
         $this->database->query('UPDATE tl_content SET bootstrap_grid=columnset_id WHERE bootstrap_grid = 0');
     }
 }
All Usage Examples Of Database::query