本文整理汇总了PHP中DataProvider::GetRows方法的典型用法代码示例。如果您正苦于以下问题:PHP DataProvider::GetRows方法的具体用法?PHP DataProvider::GetRows怎么用?PHP DataProvider::GetRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataProvider
的用法示例。
在下文中一共展示了DataProvider::GetRows方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
?>
" type="audio/mpeg" />
</audio>
<?php
}
?>
<div class="decoration"></div>
<div class="container">
<h4>Những bài khác</h4>
<em class="small-heading">Bé có thể chọn những bài khác bên dưới nhé!</em>
</div>
<?php
$sql_goiy = 'SELECT bh.bh_ID, bh.bh_LoaiBaiHoc, bh.bh_HinhDaiDien,bh_TenBaiHoc
FROM baihoc bh
WHERE bh.bh_LoaiBaiHoc = ' . $idLoaiBaiHoc . '';
$dsgoiy = DataProvider::GetRows($sql_goiy);
?>
<div class="staff-slider">
<div class="staff-slider-no-transition" data-snap-ignore="true">
<?php
if ($dsgoiy != null) {
foreach ($dsgoiy as $goiy) {
?>
<div class="staff-item">
<a href="baihoc.php?bh=<?php
echo $goiy['bh_ID'];
?>
&lbh=<?php
echo $goiy['bh_LoaiBaiHoc'];
?>
"><img src="<?php
示例2: count
<?php
include_once "dataconfig/dataprovider.php";
$skip = 0;
if (isset($_GET['skip'])) {
$skip = $_GET['skip'];
}
if ($skip == null) {
$skip = 0;
}
$sql = "SELECT count(tc_ID) rows FROM trochoi";
$result = DataProvider::GetRows($sql);
$frow = $result[0];
$nRows = $frow['rows'];
$sql = "SELECT tc_ID, tc_TieuDe FROM trochoi LIMIT {$skip}, 9";
$result = DataProvider::GetRows($sql);
if ($result != null) {
foreach ($result as $value) {
?>
<!-- ===============================================================
baihoc.php?bh=?php echo $value['bh_ID']; ?>&lbh=?php echo $lessonid; ?>
-->
<a href="danhsachmangtc.php?id=<?php
echo $value['tc_ID'];
?>
&td=<?php
echo $value['tc_TieuDe'];
?>
">
<i class="bg-green-dark bg-hover-green-dark fa border-radius-img">
<img class="img-responsive img-circle" src="images/pictures/trochoi.png">
示例3: foreach
echo $value[2];
?>
" class="btn btn-primary noprint">Xóa nội dung</a></td>
<td><a href="edit-baihoc.php?lbh=2&id=<?php
echo $value[0];
?>
" class="btn btn-primary noprint">Sửa</a></td>
<td><a href="edit-baihoc.php?lbh=3&id=<?php
echo $value[0];
?>
" class="btn btn-primary noprint">Xóa</a></td>
</tr>
<?php
}
} else {
$result = DataProvider::GetRows("select * from baihoc");
//echo $result; exit;
foreach ($result as $value) {
?>
<tr>
<td><?php
echo $value[0];
?>
</td>
<td><?php
echo $value[1];
?>
</td>
<td><?php
if ($value[2] == 1) {
示例4:
<div class="form-group">
<label class="col-sm-2 control-label">Tên bài học</label>
<div class="col-sm-10">
<input name="txtTenBaiHoc" type="text" class="form-control" required="required" value="<?php
echo $result[1];
?>
">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Loại bài học</label>
<div class="col-sm-10">
<select name="cbTypeBaiHoc" class="btn btn-default dropdown-toggle" style="width:50%">
<?php
$sql = "select * from loaibaihoc";
$result_typeuser = DataProvider::GetRows($sql);
foreach ($result_typeuser as $value) {
if ($value[0] == $result[2]) {
echo "<option value='{$value['0']}' selected='selected'>{$value['1']}</option>";
} else {
echo "<option value='{$value['0']}'>{$value['1']}</option>";
}
}
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Ngày tạo</label>
<div class="col-sm-10">
<div class="col-sm-3">
示例5:
</div>
<div id="content" class="snap-content">
<div class="content">
<div class="header-clear-large"></div>
<!--Page content goes here, fixed elements go above the all elements class-->
<?php
include_once 'dataconfig/dataprovider.php';
?>
<?php
$id_BaiHoc = $_GET["bh"];
$id_LoaiBaiHoc = $_GET["lbh"];
$sql_tieude = "select bh_TenBaiHoc from baihoc where bh_ID = {$id_BaiHoc} and bh_LoaiBaiHoc = {$id_LoaiBaiHoc}";
$result = DataProvider::GetRows($sql_tieude);
$tieude;
foreach ($result as $value) {
$tieude = $value;
}
?>
<div class="container heading-style-5">
<h4 class="heading-title"><?php
echo $tieude[0];
?>
</h4>
<i class="fa fa-bolt heading-icon"></i>
<div class="line bg-black"></div>
<p class="heading-subtitle">
Chọn hình cái loa để phát âm nhé !
</p>
示例6:
<div class="container heading-style-5">
<h4 class="heading-title">Các bài được học nhiều nhất !</h4>
<i class="fa fa-th heading-icon"></i>
<div class="line bg-black"></div>
</div>
<?php
include_once 'dataconfig/dataprovider.php';
$result = DataProvider::GetRows("select bh_ID, bh_HinhDaiDien, bh_LoaiBaiHoc,bh_TenBaiHoc from baihoc order by bh_SoLanChon desc limit 5");
?>
<div class="staff-slider">
<div class="staff-slider-no-transition" data-snap-ignore="true">
<?php
foreach ($result as $value) {
?>
<div class="staff-item">
<a href="baihoc.php?bh=<?php
echo $value[0];
?>
&lbh=<?php
echo $value[2];
?>
"><img src="<?php
echo $value[1];
?>
" alt="img"></a>
<h3><?php
echo $value['bh_TenBaiHoc'];
?>
</h3>
</div>
示例7: foreach
echo $value[0];
?>
" class="btn btn-primary noprint">Delete
</a>
</div>
</div>
<?php
}
} else {
echo "Không có dữ liệu! ";
}
} else {
if ($loai == 4) {
$listBH = "select * from hinhanh where ha_BaiHoc = {$id}";
$result_listBH = DataProvider::GetRows($listBH);
foreach ($result_listBH as $value) {
?>
<?php
}
if ($result_listBH != null) {
foreach ($result_listBH as $value) {
?>
<div class="form-group">
<div class="form-group">
<label class="col-sm-2 control-label">Hình ảnh</label>
<div class="col-sm-10">
<input name="txtHinhAnh[]" type="hidden" class="form-control">
<input type="file" name="myfileImage[]">
示例8:
<th>Tên Tài Khoản</th>
<th>Loại Người Dùng</th>
<th>Chỉnh sửa</th>
<th>Khóa</th>
</tr>
</thead>
<tbody>
<?php
if (!isset($_GET['page'])) {
$page = 1;
} else {
$page = $_GET['page'];
}
$max_results = 9;
$from = $page * $max_results - $max_results;
$result = DataProvider::GetRows("select * from taikhoan LIMIT {$from}, {$max_results}");
foreach ($result as $value) {
?>
<tr>
<td><?php
echo $value[0];
?>
</td>
<td><?php
echo $value[1];
?>
</td>
<td><?php
if ($value[2] == 1) {
echo 'Nam';
示例9:
<div class="thumbnail-menu">
<!-- ===============================================================-->
<?php
include_once "dataconfig/dataprovider.php";
if (!isset($_GET['page'])) {
$page = 1;
} else {
$page = $_GET['page'];
}
$max_results = 9;
$from = $page * $max_results - $max_results;
$id = $_SESSION['UID'];
$sqlquery = "SELECT ls.lsbt_ID, bt.bt_TieuDe, ls.lsbt_SoCauDung, ls.lsbt_DiemSo, ls.lsbt_NgayLam\n\t\t\t\t\t\t\t\t\tFROM lichsubaitap ls JOIN baitap bt ON ls.lsbt_BaiTap = bt.bt_ID \n\t\t\t\t\t\t\t\t\tWHERE ls.lsbt_TaiKhoan = {$id} LIMIT {$from}, {$max_results}";
$result = DataProvider::GetRows($sqlquery);
?>
<!-- ===============================================================-->
</div>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
<th>Tên bài tập</th>
<th>Số câu đúng</th>
<th>Điểm số</th>
<th>Ngày Làm</th>
</tr>
</thead>
<?php