本文整理汇总了PHP中Sql::connectToDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP Sql::connectToDatabase方法的具体用法?PHP Sql::connectToDatabase怎么用?PHP Sql::connectToDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sql
的用法示例。
在下文中一共展示了Sql::connectToDatabase方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setThresholdPeriod
public function setThresholdPeriod($thresholdPeriod)
{
$this->thresholdPeriodYears = $thresholdPeriod;
$s = new Sql();
global $databaseName;
$connectValue = $s->connectToDatabase($databaseName);
$row = $s->insertToConfig($connectValue, $thresholdPeriod);
}
示例2: __construct
public function __construct($name)
{
$s = new Sql();
$connect = $s->connectToDatabase('recruit');
$jbID = $s->createJobPosition($connect, $name);
$this->jpID = $jbID;
$this->jobPositionName = $name;
}
示例3: getStatus
public function getStatus()
{
$s = new Sql();
$connect = $s->connectToDatabase('recruit');
$data = mysqli_query($connect, "SELECT sessionstatus.status FROM sessionstatus,recruitmentsession WHERE recruitmentsession.sessionStatusID=sessionstatus.sessionStatusID AND RSID='{$this->RSID}'");
$row = $data->fetch_row();
return $row[0];
}
示例4: __construct
public function __construct($name, $jb)
{
$s = new Sql();
$connectValue = $s->connectToDatabase($databaseName);
$this->name = $name;
$this->dateCreated = date("Y-m-d");
$this->jobPosition = $jb;
$RSID = $s->setSessionQuery($connectValue, $name, $this->dateCreated, $jb);
echo "RecruitmentSession works " . $RSID . "";
//$recSesID = $RSID;
// Set session variables
//$_SESSION["rSessionID"] = $RSID;
}
示例5: Sql
},
function(data)
{
//alert(interviewname);
}
);
});
});
</script>
<?php
require_once "Sql.php";
require_once "GlobalVariables.php";
$s = new Sql();
$connect = $s->connectToDatabase($databaseName);
global $db, $user, $pass;
try {
$dbh = new PDO($db, $user, $pass);
$loadStatus = $dbh->prepare("SELECT sessionStatusID,status FROM sessionStatus");
if ($loadStatus->execute()) {
$loadStatus->setFetchMode(PDO::FETCH_ASSOC);
}
} catch (Exception $error) {
echo '<p>', $error->getMessage(), '</p>';
}
?>
</head>
<body>
示例6: count
txt += "<br>The path of the selected file: " + x.value; // If the browser does not support the files property, it will return the path of the selected file instead.
}
}
}
</script>
<?php
if (isset($_GET["id"])) {
$sessionID = $_GET["id"];
}
if (isset($_FILES['fileToUpload'])) {
$file = $_FILES['fileToUpload'];
$fileCount = count($file["name"]);
//Used only for viewing purposes
$text = "";
$s = new Sql();
$connectValue = $s->connectToDatabase($databaseName);
for ($i = 0; $i < $fileCount; $i++) {
$cv = $s->createNewCV($connectValue, $i);
$candidate = null;
//$sessionID = $_SESSION['rSessionID'];
//if (isset($_COOKIE['rSessionID'])){
//$sessionID = $_COOKIE['rSessionID'];
//}
//echo $_GET["id"];
//$sessionID = $_GET["id"];
// $sessionID="RS055";
echo "<ul id=\"feedBack\" class=\"list-group\">";
if ($cv != null) {
$candidate = $s->createNewCandidate($connectValue, $cv, $sessionID);
echo "<li class=\"list-group-item list-group-item-success\">" . $file["name"][$i] . " upload is successful</li>";
} else {
示例7: Sql
function __construct()
{
$s = new Sql();
$this->connectValue = $s->connectToDatabase('recruit');
}