当前位置: 首页>>代码示例>>PHP>>正文


PHP DataProvider::GetRows方法代码示例

本文整理汇总了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 
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:31,代码来源:inc-baihoc-cau.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">
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:30,代码来源:inc-dstrochoi.php

示例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) {
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:31,代码来源:inc-quanlybaihoc.php

示例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">
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:31,代码来源:inc-editbaihoc.php

示例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>
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:29,代码来源:baihoc.php

示例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>
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:31,代码来源:inc-top.php

示例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[]">
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:31,代码来源:inc-deletelistbaihoc.php

示例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';
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:31,代码来源:inc-quanlytaikhoan.php

示例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 
开发者ID:hackernam,项目名称:TapDoc-HocSinhLop1,代码行数:30,代码来源:inc-lichsubaitap.php


注:本文中的DataProvider::GetRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。