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


PHP B::select方法代码示例

本文整理汇总了PHP中B::select方法的典型用法代码示例。如果您正苦于以下问题:PHP B::select方法的具体用法?PHP B::select怎么用?PHP B::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在B的用法示例。


在下文中一共展示了B::select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: B

<?php

$masp = $_POST["masanpham"];
$dg = $_POST["dongia"];
$sl = $_POST["soluong"];
$tt = $_POST["thanhtien"];
$b = new B();
$sql = "insert into hoadon(MaHD,TenKhachHang,SoDienThoai,DiaChi,ThanhTien) values('','','','','{$tt}')";
$arr = array(" '', '', '', '', '{$tt}' ");
//print_r($arr);
$s = $b->insert($sql, $arr);
$ct = $b->select("select * from hoadon ");
foreach ($ct as $s) {
    $mhd = $s["MaHD"];
    $sql2 = "insert into chitiethoadon(MaChiTiet,MaSanPham,MaHD,DonGia,SoLuong) values('','{$masp}','{$mhd}','{$dg}','{$sl}') ";
    $arr = array("'','{$masp}','{$mhd}','{$dg}','{$sl}'");
    print_r($arr);
}
?>

开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:19,代码来源:xuly.php

示例2: B

<?php

$ml = $_GET["ml"];
$b = new B();
$t = $b->select("select * from loaisanpham where MaLoai = '{$ml}'");
foreach ($t as $a) {
    ?>
<form action="index.php?mod=danhmucsanpham&ac=xleditml" method="post">
Tên danh mục:<?php 
    echo $a["idTen"];
    ?>
<input type="hidden"   name="tendanhmuc"  value="<?php 
    echo $a["idTen"];
    ?>
"  /><br />
Mã Loại:<?php 
    echo $ml;
    ?>
<input type="hidden"   name="maloai"  value="<?php 
    echo $ml;
    ?>
" /><br />
Tên Loại:<input type="text" name="tenloai" value="<?php 
    echo $a["TenLoai"];
    ?>
 "/><br />

<input type="submit" value="sua"/>
</form>
<?php 
}
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:31,代码来源:editLoai.php

示例3: B

<?php

$b = new B();
$sqldem = "select Count(*) as dem from tintuc ";
$kq = $b->select($sqldem);
//print_r($kq);
$n = $kq[0]["dem"];
// echo "ban dang co $n tin ";
$pageSize = 10;
$sotrang = ceil($n / $pageSize);
$page = isset($_GET["page"]) ? $_GET["page"] : 1;
$vt = ($page - 1) * $pageSize;
$kq = $b->select("select * from tintuc limit {$vt}, {$pageSize}");
//print_r($kq);
?>
			<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
					
						
						<table>
							
							<thead>
								<tr>
								   <th>ID Tin</th>
								   <th>Tiêu đề</th>
                                   
                                   <th>Tóm Tắt Nội Dung</th>
                                   
                                   
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:29,代码来源:dstintuc.php

示例4: B

<?php

$b = new B();
$arr = $b->select("select * from nhacungcap");
?>
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
					
						
						<table>
							
							<thead>
								<tr>
								   <th>Nhà Cung Cấp</th>
								   <th>Tên Nhà Cung Cấp</th>
                                   <th>Liên Hệ</th>
								   
                                    <th>Thao Tác</th>
								</tr>
								
							</thead>
						 
							<tfoot>
								<tr>
									<td colspan="4">
										
										
										
										<div class="clear"></div>
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:31,代码来源:dsNCC.php

示例5: B

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<?php 
$id = $_GET["idtin"];
$b = new B();
$t = $b->select("select * from tintuc, loaitin  where tintuc.idLoaiTin=loaitin.idLoaiTin and idTin='{$id}'");
foreach ($t as $a) {
    ?>
<form action="index.php?mod=danhmucsanpham&ac=xledittin" method="post" enctype="multipart/form-data">
ID Tin: <?php 
    echo $id;
    ?>
<input type="hidden" name="idtin" /></br>
Loại Tin :<?php 
    echo $a["tenLoaiTin"];
    ?>
<input type="hidden" name="loaitin" /></br>
Hình ảnh: <input type="file" name="hinhanh" /></br>
Tiêu đề : <input type="text" name="tieude" value="<?php 
    echo $a["tieuDe"];
    ?>
" /></br>
Nội dung ngắn :<input type="text" name="noidungngan" value="<?php 
    echo $a["tomTatnd"];
    ?>
" /></br>
Nội dung chi tiết: <textarea rows="20" cols="70" name="noidung"><?php 
    echo $a["noiDungCT"];
    ?>
</textarea></br>
<script type="text/javascript">CKEDITOR.replace( 'noidung'); </script>
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:30,代码来源:edittin.php

示例6: show

    public function show()
    {
        if (Count($this->giohang) == 0) {
            echo "Giỏ hàng rỗng";
            return;
        } else {
            echo "<table style='width:100%' border=\"0\"><tr  border=\\><td>Sản phẩm đã chọn</td><td>Số lượng</td><td>Đơn Giá</td><td>Giá Khuyến Mãi</td><td>Thành tiền</td></tr>";
            $tongtien = 0;
            //khởi tạo tổng tiền trong hàm hiển thị
            foreach ($this->giohang as $msp => $sl) {
                $a = new B();
                $arr = $a->select("select * from sanpham where Masanpham='{$msp}'");
                foreach ($arr as $r) {
                    $tongtien += $sl * $r['Dongia'] - $sl * $r['GiaKhuyenMai'];
                    ?>
                <?php 
                    echo "<tr>";
                    ?>
              
                
                 <td><div style="float:right; width:50%;">
				 	<?php 
                    echo $r["Tensanpham"];
                    ?>
                    <p><?php 
                    echo $r["MaNCC"];
                    ?>
</p>
                    <p><a href="<?php 
                    echo BASE_URL;
                    ?>
/index.php?mod=giohang&ac=del&masanpham=<?php 
                    echo $msp;
                    ?>
"><img src="images/Trash-25.png"</a></p>
                 </div>
                 <div style="float:left; width:50%;"><img src="<?php 
                    echo BASE_URL . "/" . $r['Hinhanh'];
                    ?>
" width="100px"  height="100px"/></div> </td>
					  
					
                   <td> <?php 
                    echo $sl;
                    ?>
</td>
					<td><?php 
                    echo number_format($r['Dongia'], 3) . " đồng";
                    ?>
</td>
                    <td><?php 
                    echo number_format($r['GiaKhuyenMai'], 3) . " đồng";
                    ?>
</td>
					<td><?php 
                    echo number_format($sl * $r['Dongia'] - $sl * $r['GiaKhuyenMai'], 3) . " đồng";
                    ?>
</td>
                    
					<?php 
                    echo "</tr>";
                }
            }
            echo "</table>";
            $this->tongtien = $tongtien;
            //gán tổng tiền trong hàm cho biến tong tiền của class
        }
    }
开发者ID:maitinthuy,项目名称:Do_An,代码行数:68,代码来源:gh.class.php

示例7: B

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<?php 
$a = new B();
?>

<form action="index.php?mod=themsp" method="post" enctype="multipart/form-data">
Mã sản phẩm: <input type="hidden" name="masanpham"  /><br />
Tên sản phẩm: <input type="text" name="tensanpham"/><br />
Đơn giá: <input type="text" name="gia" /><br />
Giá khuyến mãi: <input type="text" name="giaKM"  /><br />
Hình ảnh: <input type="file" name="hinh" /><br />
Tên Mã Loại: <select name="ml"/>
<?php 
$arr = $a->select("select * from loaisanpham");
foreach ($arr as $r) {
    ?>
<option value="<?php 
    echo $r["MaLoai"];
    ?>
"> <?php 
    echo $r["TenLoai"];
    ?>
</option>
 <?php 
}
?>
</select><br />
Tên Nhà cung cấp: <select name="mncc"/>
<?php 
$arr = $a->select("select * from nhacungcap");
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:30,代码来源:themsp.php

示例8: B

<?php

$b = new B();
$arr = $b->select("select * from binhluan where duyet=0 ");
?>
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
					
						
						<table>
							
							<thead>
								<tr>
								   <th>ID Bình luận</th>
								   <th>Mã sản phẩm</th>
								   
								   <th>Nội dụng comment</th>
                                    <th>Trạng thái</th>
                                    <th>Duyệt</th>
								</tr>
								
							</thead>
						 
							<tfoot>
								<tr>
									<td colspan="4">
										
										
										
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:28,代码来源:hienthi.php

示例9:

  <div id="menu1">
  	<div id="menu">
     <ul id="ul">
            <li><a href="index.php?mod=trangchu">Trang Chủ</a></li>
            <li><a href="index.php?mod=gioithieu">Giới Thiệu</a>
            	<ul>   
                <li><a href="index.php?mod=gioithieu&idgt=thongtin">Thông tin về SPACE </a></li>
                <li><a href="index.php?mod=gioithieu&idgt=quatrinh">Quá Trình Phát Triển </a></li>
                
                
          		</ul>
            </li>
            <li><a href="index.php?mod=sanpham">Sản Phẩm</a>
                <ul>
                    <?php 
$arr = $b->select("select * from danhmucsanpham");
foreach ($arr as $r) {
    ?>
<li>
                  <a href="index.php?mod=sanpham&i=loaisanpham&iddm=<?php 
    echo $r["idTen"];
    ?>
"><?php 
    echo $r["TenDanhMuc"];
    ?>
 </a>
                </li><?php 
}
?>
                </ul>
            </li>
开发者ID:maitinthuy,项目名称:Do_An,代码行数:31,代码来源:index.php

示例10: B

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<?php 
$msp = $_GET["msp"];
$b = new B();
$t = $b->select("select * from loaisanpham lsp inner join sanpham sp inner join nhacungcap ncc on sp.MaLoai=lsp.MaLoai and sp.MaNCC=ncc.MaNCC  where Masanpham = '{$msp}'");
foreach ($t as $a) {
    ?>
<form action="index.php?mod=danhmucsanpham&ac=xleditsp" method="post" enctype="multipart/form-data">
Mã sản phẩm: <?php 
    echo $msp;
    ?>
<input type="hidden" name="masanpham" /></br>
Tên sản phẩm:<input type="text" name="tensanpham" value="<?php 
    echo $a["Tensanpham"];
    ?>
 " /></br>
Đơn giá: <input type="text" name="gia" value="<?php 
    echo number_format($a["Dongia"], 3);
    ?>
" /></br>
Giá khuyến mãi: <input type="text" name="giaKM" value="<?php 
    echo number_format($a["GiaKhuyenMai"], 3);
    ?>
"/></br>
Hình ảnh: <input type="file" name="hinhanh" /></br>
Tên Loại:<?php 
    echo $a["TenLoai"];
    ?>
 <input type="hidden" name="maloai" /></br>
Tên nhà cung cấp:<?php 
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:30,代码来源:editsp.php

示例11: B



<?php 
$timkiem = $_POST["tk"];
$b = new B();
$sql = "select * from sanpham where Tensanpham like '%{$timkiem}%' ";
$arr = array($timkiem);
$kq = $b->select($sql, $arr);
//print_r($kq);
if (Count($kq) == 0) {
    echo "sai";
} else {
    echo "có " . Count($kq) . " sản phẩm tìm được";
    ?>

                <div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
					
						
						<table>
							
							<thead>
								<tr>
								   <th>Mã Sản Phẩm</th>
								   <th>Tên Sản Phẩm</th>
                                   <th>Đơn Giá</th>
                                   <th>Giá Khuyến Mãi</th>
                                   
                                   <th>Mã Loại</th>
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:29,代码来源:xulytimkiem.php

示例12: B

<?php

include "../../class/b.class.php";
$m = new B();
$ma = $_POST["masanpham"];
$l = $m->select("select * from sanpham where Masanpham='{$ma}' ");
开发者ID:maitinthuy,项目名称:Do_An,代码行数:6,代码来源:thanhtoan.php

示例13: B

<?php

$b = new B();
$arr = $b->select("select * from loaisanpham");
?>
				<div class="content-box-content">
					
					<div class="tab-content default-tab" id="tab1"> <!-- This is the target div. id must match the href of this div's tab -->
						
					
						
						<table>
							
							<thead>
								<tr>
								   <th>Mã Loại</th>
								   <th>Tên Loại</th>
								   
								   <th>ID Tên Danh Mục</th>
                                    <th>Thao Tác</th>
								</tr>
								
							</thead>
						 
							<tfoot>
								<tr>
									<td colspan="4">
										
										
										
										<div class="clear"></div>
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:31,代码来源:dsloaisanpham.php

示例14: B

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>

<?php 
$a = new B();
?>

<form action="index.php?mod=themtt" method="post" enctype="multipart/form-data">
ID Tin: <input type="hidden" name="idTin"  /><br />
ID Loại Tin: <select name="idLT">
<?php 
$arr = $a->select("select * from loaitin");
foreach ($arr as $r) {
    ?>
<option value="<?php 
    echo $r["idLoaiTin"];
    ?>
"><?php 
    echo $r["tenLoaiTin"];
    ?>
</option> <?php 
}
?>
</select><br />
Ảnh Đại Diện:<input type="file" name="anhdaidien" /><br />
Tiêu đề: <input type="text" name="tieude" /><br />
Nội dung ngắn: <input type="text" name="ndngan" /><br />
Nội dung chi tiết:
<textarea rows="20" cols="70" name="noidung"></textarea> 

<script type="text/javascript">CKEDITOR.replace( 'noidung'); </script>
<input type="submit" value="thêm"/>
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:31,代码来源:themtintuc.php

示例15: B

<?php 
$a = new B();
?>

<form action="index.php?mod=themloai" method="post">
Mã Loại: <input type="text" name="maloai"  />
Tên Loại: <input type="text" name="tenloai"/>
Tên ID Tên Danh Mục: <select name="idTen"/>
<?php 
$arr = $a->select("select * from danhmucsanpham");
foreach ($arr as $r) {
    ?>
<option value="<?php 
    echo $r["idTen"];
    ?>
"> <?php 
    echo $r["TenDanhMuc"];
    ?>
</option>
 <?php 
}
?>
</select>
<input type="submit" value="thêm"/>
</form>
开发者ID:maitinthuy,项目名称:DoAnChuyenNganh,代码行数:25,代码来源:themloaimoi.php


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