本文整理汇总了PHP中DataProvider::NumRows方法的典型用法代码示例。如果您正苦于以下问题:PHP DataProvider::NumRows方法的具体用法?PHP DataProvider::NumRows怎么用?PHP DataProvider::NumRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataProvider
的用法示例。
在下文中一共展示了DataProvider::NumRows方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: COUNT
<!-- page content -->
<div class="right_col" role="main">
<?php
include_once "../dataconfig/dataprovider.php";
$tongnguoidung = DataProvider::NumRows("SELECT COUNT(*) as Num FROM taikhoan");
$tongnguoinam = DataProvider::NumRows("SELECT COUNT(*) as Num FROM taikhoan where tk_GioiTinh = 1");
$tongnguoinu = DataProvider::NumRows("SELECT COUNT(*) as Num FROM taikhoan where tk_GioiTinh = 2");
$tongbaihoc = DataProvider::NumRows("SELECT COUNT(*) as Num FROM baihoc");
$tongbaitap = DataProvider::NumRows("SELECT COUNT(*) as Num FROM baitap");
$tongcautrochoi = DataProvider::NumRows("SELECT COUNT(*) as Num FROM xepchu");
$tongam = DataProvider::NumRows("SELECT COUNT(*) as Num FROM am");
$tongtu = DataProvider::NumRows("SELECT COUNT(*) as Num FROM tu");
$tongcau = DataProvider::NumRows("SELECT COUNT(*) as Num FROM cau");
$tonghinh = DataProvider::NumRows("SELECT COUNT(*) as Num FROM hinhanh");
$tongloai = $tongam + $tongtu + $tongcau + $tonghinh;
?>
<!-- top tiles -->
<div class="row tile_count">
<div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">
<div class="left"></div>
<div class="right">
<span class="count_top"><i class="fa fa-user"></i> Tổng số người dùng</span>
<div class="count"><?php
echo $tongnguoidung;
?>
</div>
</div>
</div>
<div class="animated flipInY col-md-2 col-sm-4 col-xs-4 tile_stats_count">
<div class="left"></div>
示例2: COUNT
<div class="activity-item-detail">
Chọn hình ảnh để học lại bài học đó nhé !
</div>
</div>
<div class="decoration"></div>
<?php
}
} else {
echo 'Bạn chưa học bài nào.';
}
?>
<div class="col-md-12 text-center">
<ul class="pagination pagination-lg pager" ><?php
$total_results = DataProvider::NumRows("SELECT COUNT(*) as Num FROM lichsubaihoc where lsbh_TaiKhoan = {$uiduser}");
$total_pages = ceil($total_results / $max_results);
for ($i = 1; $i <= $total_pages; $i++) {
?>
<?php
if ($i == $_GET['page']) {
?>
<li class="active">
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?page=<?php
echo $i;
?>
" class="page_link active">
示例3: COUNT
<td><a href="edit-taikhoan.php?lhd=3&id=<?php
echo $value[0];
?>
" class="btn btn-primary noprint">Delete</a></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="col-md-12 text-center">
<ul class="pagination pagination-lg pager" ><?php
$total_results = DataProvider::NumRows("SELECT COUNT(*) as Num FROM taikhoan");
$total_pages = ceil($total_results / $max_results);
for ($i = 1; $i <= $total_pages; $i++) {
?>
<?php
if ($i == $_GET['page']) {
?>
<li class="active">
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?page=<?php
echo $i;
?>
" class="page_link active">
示例4: date_format
<td><?php
echo date_format($fdate, 'm/d/Y');
?>
</td>
</tr>
</tbody>
<?php
$stt++;
}
}
?>
</table>
</div>
<div class="col-md-12 text-center">
<ul class="pagination pagination-lg pager" ><?php
$total_results = DataProvider::NumRows("SELECT COUNT(*) as Num FROM lichsubaitap where lsbt_TaiKhoan = {$id}");
$total_pages = ceil($total_results / $max_results);
for ($i = 1; $i <= $total_pages; $i++) {
?>
<?php
if ($i == $_GET['page']) {
?>
<li class="active">
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?page=<?php
echo $i;
?>
" class="page_link active">
示例5: COUNT
echo $value['bt_TieuDe'];
?>
</em>
</a>
<?php
}
}
?>
</div>
<div class="decoration">
</div>
<div class="col-md-12 text-center">
<ul class="pagination pagination-lg pager" ><?php
$total_results = DataProvider::NumRows("SELECT COUNT(*) as Num FROM baitap");
$total_pages = ceil($total_results / $max_results);
for ($i = 1; $i <= $total_pages; $i++) {
?>
<?php
if ($i == $_GET['page']) {
?>
<li class="active">
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?page=<?php
echo $i;
?>
" class="page_link active">
示例6: COUNT
Màng <?php
echo $value['xc_level'];
?>
</em>
</a>
<?php
}
}
?>
</div>
<div class="decoration">
</div>
<div class="col-md-12 text-center">
<ul class="pagination pagination-lg pager" ><?php
$total_results = DataProvider::NumRows("SELECT COUNT(*) as Num FROM xepchu");
$total_pages = ceil($total_results / $max_results);
for ($i = 1; $i <= $total_pages; $i++) {
?>
<?php
if ($i == $_GET['page']) {
?>
<li class="active">
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?page=<?php
echo $i;
?>
" class="page_link active">
示例7: COUNT
<em style="font-weight: bold;"><?php
echo $value['bh_TenBaiHoc'];
?>
</em>
</a>
<?php
}
}
?>
</div>
<div class="decoration"></div>
<div class="col-md-12 text-center">
<ul class="pagination pagination-lg pager" ><?php
$total_results = DataProvider::NumRows("SELECT COUNT(*) as Num FROM baihoc WHERE bh_LoaiBaiHoc = {$lessonid}");
$total_pages = ceil($total_results / $max_results);
for ($i = 1; $i <= $total_pages; $i++) {
?>
<?php
if ($i == $_GET['page']) {
?>
<li class="active">
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?lsid=<?php
echo $id_LoaiBaiHoc;
?>
&page=<?php