當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Sql::connectToDatabase方法代碼示例

本文整理匯總了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);
 }
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:8,代碼來源:threshold.php

示例2: __construct

 public function __construct($name)
 {
     $s = new Sql();
     $connect = $s->connectToDatabase('recruit');
     $jbID = $s->createJobPosition($connect, $name);
     $this->jpID = $jbID;
     $this->jobPositionName = $name;
 }
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:8,代碼來源:jobPosition.php

示例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];
 }
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:8,代碼來源:RecruitmentSession.php

示例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;
 }
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:13,代碼來源:RecruitmentSessionold.php

示例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>
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:31,代碼來源:candidateList.php

示例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 {
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:31,代碼來源:uploadCVs.php

示例7: Sql

 function __construct()
 {
     $s = new Sql();
     $this->connectValue = $s->connectToDatabase('recruit');
 }
開發者ID:vbalalla,項目名稱:project_CV_and_Recruitment_Management,代碼行數:5,代碼來源:Search.php


注:本文中的Sql::connectToDatabase方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。