本文整理汇总了PHP中SqlParser::execSqlScript方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlParser::execSqlScript方法的具体用法?PHP SqlParser::execSqlScript怎么用?PHP SqlParser::execSqlScript使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlParser
的用法示例。
在下文中一共展示了SqlParser::execSqlScript方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayDatabaseForm
} else {
$proxy_host = NULL;
$proxy_port = NULL;
}
displayDatabaseForm($originPage, $db_mantis_host, $db_mantis_database, $db_mantis_user, $db_mantis_pass);
$action = (string) getHttpVariable(INPUT_POST, 'action', 'none');
if ("setDatabaseInfo" == $action) {
try {
$database_version = checkDBConnection($db_mantis_host, $db_mantis_user, $db_mantis_pass, $db_mantis_database);
echo "<script type=\"text/javascript\">console.log(\"DEBUG: Mantis database_version = {$database_version}\");</script>";
checkDBprivileges($db_mantis_database);
echo "<script type=\"text/javascript\">console.log(\"Step 1/4 create config.ini file\");</script>";
createConfigFile($db_mantis_host, $db_mantis_user, $db_mantis_pass, $db_mantis_database, $proxy_host, $proxy_port);
echo "<script type=\"text/javascript\">console.log(\"Step 2/4 execSQLscript2 - create Tables\");</script>";
//$retCode = Tools::execSQLscript2(Install::FILENAME_TABLES);
$retCode = SqlParser::execSqlScript(Install::FILENAME_TABLES);
if (0 != $retCode) {
throw new Exception('ERROR: Could not execute SQL script: ' . Install::FILENAME_TABLES);
}
$request = "SELECT value from `codev_config_table` WHERE `config_id` = 'database_version' ";
if (!SqlWrapper::getInstance()->sql_query($request)) {
throw new Exception('ERROR: CodevTT database tables not created.');
}
echo "<script type=\"text/javascript\">console.log(\"Step 3/4 execSQLscript2 - create Procedures\");</script>";
// procedures are defined in install/codevtt_procedures.php
foreach ($codevtt_sqlProcedures as $query) {
$result = SqlWrapper::getInstance()->sql_query(trim($query));
if (!$result) {
throw new Exception('ERROR: SQL procedure creation failed FAILED');
}
}