private function get_create_table_queries($db_type, $table_prefix, $db_schema)
{
/* Grab the queries from the RDBMS schema file */
$file_path = HABARI_PATH . "/system/schema/{$db_type}/schema.sql";
$schema_sql = trim(file_get_contents($file_path), "\r\n ");
$schema_sql = str_replace('{$schema}', $db_schema, $schema_sql);
$schema_sql = str_replace('{$prefix}', $table_prefix, $schema_sql);
/*
* Just in case anyone creates a schema file with separate statements
* not separated by two newlines, let's clean it here...
* Likewise, let's clean up any separations of *more* than two newlines
*/
$schema_sql = str_replace(array("\r\n", "\r"), array("\n", "\n"), $schema_sql);
$schema_sql = preg_replace("/;\n([^\n])/", ";\n\n\$1", $schema_sql);
$schema_sql = preg_replace("/\n{3,}/", "\n\n", $schema_sql);
$queries = preg_split('/(\\r\\n|\\r|\\n)\\1/', $schema_sql);
return $queries;
}