+ [bug#51074,start,0.5h,1h] add createView function.
This commit is contained in:
@@ -6,7 +6,6 @@ if(count($argv) < 7)
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
function getPDO($argv)
|
||||
{
|
||||
global $pdo;
|
||||
@@ -75,6 +74,15 @@ function insert($table, $data)
|
||||
$statement->execute();
|
||||
}
|
||||
|
||||
function createView($viewName, $sql)
|
||||
{
|
||||
global $pdo;
|
||||
|
||||
$prepareSql = "CREATE OR REPLACE VIEW $viewName AS $sql";
|
||||
$statement = $pdo->prepare($prepareSql);
|
||||
$statement->execute();
|
||||
}
|
||||
|
||||
global $pdo;
|
||||
$path = $argv[6];
|
||||
getPDO($argv);
|
||||
|
||||
Reference in New Issue
Block a user