You are here

public function OAuthStoreMySQLi::install in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::install()
  2. 7.2 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::install()
  3. 7.4 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::install()
  4. 7.5 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::install()
  5. 7.6 lib/oauth-php/library/store/OAuthStoreMySQLi.php \OAuthStoreMySQLi::install()

* Initialise the database

Overrides OAuthStoreMySQL::install

File

lib/oauth-php/library/store/OAuthStoreMySQLi.php, line 44

Class

OAuthStoreMySQLi

Code

public function install() {
  $sql = file_get_contents(dirname(__FILE__) . '/mysql/mysql.sql');
  $ps = explode('#--SPLIT--', $sql);
  foreach ($ps as $p) {
    $p = preg_replace('/^\\s*#.*$/m', '', $p);
    $this
      ->query($p);
    $this
      ->sql_errcheck($p);
  }
}