You are here

protected function DatabaseSchema_mysql::createKeysSqlHelper in Drupal 7

1 call to DatabaseSchema_mysql::createKeysSqlHelper()
DatabaseSchema_mysql::createKeysSql in includes/database/mysql/schema.inc

File

includes/database/mysql/schema.inc, line 302
Database schema code for MySQL database servers.

Class

DatabaseSchema_mysql

Code

protected function createKeysSqlHelper($fields) {
  $return = array();
  foreach ($fields as $field) {
    if (is_array($field)) {
      $return[] = '`' . $field[0] . '`(' . $field[1] . ')';
    }
    else {
      $return[] = '`' . $field . '`';
    }
  }
  return implode(', ', $return);
}