+ [bug#51074,start,0.5h,1h] add createView function.

This commit is contained in:
qixinzhi
2024-06-14 05:42:07 +00:00
committed by 代婷婷
parent 181b69e4eb
commit aecebff298
+9 -1
View File
@@ -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);