本文整理匯總了PHP中Schedule::search方法的典型用法代碼示例。如果您正苦於以下問題:PHP Schedule::search方法的具體用法?PHP Schedule::search怎麽用?PHP Schedule::search使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Schedule
的用法示例。
在下文中一共展示了Schedule::search方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: date
//echo date_format(date_add(DateTime::createFromFormat('d/m/Y', date("d/m/Y")),date_interval_create_from_date_string("5 years")),"d/m/Y");
echo date("d/m/Y");
$a = Item::search(["item_id" => 2]);
print_r($a);
$sql = "UPDATE item_copy SET item_copy_status=1;";
DB::getInstance()->directUpdate($sql);
$data = array("id" => null, "purpose" => "sdasd", "comment" => "asdsdf", "member_id" => 16);
$salt = '5&JDDlwz%Rwh!t2Yg-Igae@QxPzFTSId';
$enc_pass = md5($salt . 'admin');
echo "paswowkjhkfjw";
DB::getInstance()->directUpdate("UPDATE member SET member_password='{$enc_pass}' WHERE member_nic='000000000';");
$t = new Transaction();
$t->create($data);
$t->add();
print_r(DB::getInstance()->search("schedule", ["semester_no" => 2]));
print_r(Schedule::search(["semester_no" => 2]));
echo isset($_SESSION["basket"]);
?>
<html>
<script type="text/javascript">
function display(msg){
alert(msg);
}
</script>
</html>
<!DOCTYPE HTML>
<html>
<head>
示例2: header
<?php
require_once 'core/init.php';
$member_role = $_SESSION['roles'];
if (in_array("Laboratory Administrator", $member_role)) {
} else {
header('location:restricted_page.php');
}
$sid = $_POST["sid"];
$schedule = Schedule::search(["schedule_id" => $sid]);
$time = $_POST["time"];
$labtime = "";
$day1 = $_POST["day"];
$subject = $_POST["subject"];
$res = DB::getInstance()->directSelect("SELECT course_id FROM course WHERE course_name='{$subject}';");
if (count($res) > 0) {
$cid = $res[0]["course_id"];
}
switch ($time) {
case "m1":
$labtime = "8-9";
break;
case "m2":
$labtime = "9-10";
break;
case "m3":
$labtime = "10-11";
break;
case "m4":
$labtime = "11-12";
break;