function _db_create_key_sql in Drupal 6
Same name in this branch
- 6 includes/database.mysql-common.inc \_db_create_key_sql()
- 6 includes/database.pgsql.inc \_db_create_key_sql()
Related topics
5 calls to _db_create_key_sql()
- db_add_index in includes/
database.mysql-common.inc - Add an index.
- db_add_primary_key in includes/
database.mysql-common.inc - Add a primary key.
- db_add_unique_key in includes/
database.mysql-common.inc - Add a unique key.
- _db_create_index_sql in includes/
database.pgsql.inc - _db_create_keys_sql in includes/
database.mysql-common.inc
File
- includes/
database.pgsql.inc, line 528 - Database interface code for PostgreSQL database servers.
Code
function _db_create_key_sql($fields) {
$ret = array();
foreach ($fields as $field) {
if (is_array($field)) {
$ret[] = 'substr(' . $field[0] . ', 1, ' . $field[1] . ')';
}
else {
$ret[] = $field;
}
}
return implode(', ', $ret);
}