本文整理汇总了PHP中task::query方法的典型用法代码示例。如果您正苦于以下问题:PHP task::query方法的具体用法?PHP task::query怎么用?PHP task::query使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::query方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: task
<?php
require_once 'config.php';
session_start();
$obj = new task();
$obj->checkUser();
$admin_id = $_GET["admin_id"];
$query = "select * from admins where admin_id='{$admin_id}'";
$obj->query($query);
$obj->nextRecord();
require_once "headincludes.php";
?>
<body>
<!-- topbar starts -->
<?php
require_once "topbar.php";
?>
<!-- topbar ends -->
<div class="container-fluid">
<div class="row-fluid">
<!-- left menu starts -->
<div class="span2 main-menu-span">
<div class="well nav-collapse sidebar-nav">
<?php
require_once "sidemenu.php";
?>
</div><!--/.well -->
</div><!--/span-->
<!-- left menu ends -->
示例2: task
<?php
session_start();
require_once "config.php";
$obj1 = new task();
$obj1->checkUser();
$obj = new task();
$admin_id = $_GET['admin_id'];
$query = "select * from admins where admin_id={$admin_id}";
$data = $obj->query($query);
$row = mysqli_fetch_array($data);
extract($row);
$done = 0;
if (isset($_POST["submit"])) {
$admin = new task();
if ($admin->updateadmin()) {
header("location:admins.php?a=1");
}
}
require_once "headincludes.php";
?>
<body>
<!-- topbar starts -->
<?php
require_once "topbar.php";
?>
<!-- topbar ends -->
<div class="container-fluid">
<div class="row-fluid">
示例3: task
<?php
session_start();
$id = $_GET['admin_id'];
require_once "config.php";
$obj1 = new task();
$obj1->checkUser();
$query = "select password from admins where admin_id={$id}";
$data = $obj1->query($query);
$row = mysqli_fetch_assoc($data);
$done = 0;
if (isset($_POST["submit"])) {
$newPassword = $_POST['newpsw'];
$client = new task();
if ($client->changeAdminPsw($newPassword)) {
$done = 1;
} else {
echo "error";
}
}
require_once "headincludes.php";
?>
<body>
<!-- topbar starts -->
<?php
require_once "topbar.php";
?>
<!-- topbar ends -->
<div class="container-fluid">
<div class="row-fluid">
示例4: extract
<legend><h3 style="color:red;">Details</h3></legend>
<div class="control-group">
<label class="control-label" for="focusedInput">Name</label>
<div class="controls">
<input name="name" class="input-xlarge focused" id="focusedInput" type="text" value="">
</div>
</div>
<div class="control-group">
<label class="control-label" for="focusedInput">Under Category</label>
<div class="controls">
<select name="catid" id="selectError3">
<option value="">Select</option>
<?php
$query = "select * from categories order by name";
$client->connect();
$data = $client->query($query);
while ($row = mysqli_fetch_assoc($data)) {
extract($row);
echo "<option value='{$catid}'>{$name}</option>";
}
?>
</select>
</div>
</div>
<div class="form-actions">
<button type="submit" name="submit" class="btn btn-primary">Add Now</button>
<button class="btn"><a href="subcategories.php">Cancel</a></button>
</div>
</fieldset>
</form>
示例5: task
</div>
</div>
<div class="box-content">
<table class="table table-striped table-bordered bootstrap-datatable datatable">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th class="center">Actions</th>
</tr>
</thead>
<tbody>
<?php
$list = new task();
$query = "select * from brands where status='1' order by bid desc";
$list->query($query);
while ($list->nextRecord()) {
$id = $list->Record['bid'];
$name = $list->Record['name'];
echo "<tr>";
echo "<td>{$id}</td>";
echo "<td class='center'>{$name}</td>";
echo "<td class='center'>";
if ($_SESSION['editright'] == 'y') {
echo "<a class='btn btn-info' href='editbrand.php?id={$id}'><i class='icon-edit icon-white'></i>Edit</a> ";
}
if ($_SESSION['deleteright'] == 'y') {
echo "<a onclick='return confirm(\"Are you sure to delete this record?\");' class='btn btn-danger' href='delbrand.php?id={$id}'><i class='icon-trash icon-white'></i>Delete</a>";
}
echo "</td>";
echo "</tr>";