function dba_mysql_show_create_table in Database Administration 7
Generate code for creating table.
File
- database/
mysql.inc, line 11 - Provides database driver specific commands.
Code
function dba_mysql_show_create_table($table) {
$query = "SHOW CREATE TABLE {$table};";
$create = db_query($query)
->fetchAssoc();
return str_replace('"', '`', $create['Create Table']);
}