Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (21 sloc) 652 Bytes
<?php
include_once 'config.inc.php';
include_once 'templates/style.css';
if(!@$_POST['newschemaname'] || @$_POST['newschemaname'] == "")
{
die($lang['invalidEntry']);
}
else
{
$transport = new TSocket(HOST, PORT);
$protocol = new TBinaryProtocol($transport);
$client = new ThriftHiveClient($protocol);
$transport->open();
$sql = "CREATE SCHEMA IF NOT EXISTS ".$_POST['newschemaname']." COMMENT '".$_POST['newschemacomment']."'";
$client->execute($sql);
echo $sql;
//$db_array = $client->fetchOne();
echo '<script>alert(\''.$lang['createSchemaSuccess'].'\');window.location=\'index.php?frame=right\';</script>';
$transport->close();
}
?>