initializing git repo
This commit is contained in:
commit
3df8fc53b8
86 changed files with 5649 additions and 0 deletions
28
includes/mysql.php
Executable file
28
includes/mysql.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
$MysqlErrorsArePresent = 0;
|
||||
$GlobalMysqlHandler=mysqli_connect($GlobalMysqlHost,$GlobalMysqlUser,$GlobalMysqlPwd);
|
||||
|
||||
if (!$GlobalMysqlHandler)
|
||||
{
|
||||
ErrorLog("[mysql.php] Can not connect to mysql database \"$GlobalMysqlHost\" as \"$GlobalMysqlUser\"!");
|
||||
$MysqlErrorsArePresent = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!mysqli_select_db($GlobalMysqlHandler, $GlobalMysqlDatabase))
|
||||
{
|
||||
ErrorLog("[mysql.php] Can not select mysql database \"$GlobalMysqlDatabase\"!");
|
||||
$MysqlErrorsArePresent = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if ($MysqlErrorsArePresent)
|
||||
MessageError(LangSpellHtml('SentenceDatabaseError'));
|
||||
|
||||
function MysqlCloseDb ()
|
||||
{
|
||||
global $GlobalMysqlHandler;
|
||||
mysqli_close($GlobalMysqlHandler);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue