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


PHP db::count_record方法代码示例

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


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

示例1: ceil

 $tab_negara = "";
 if (isset($_REQUEST["kcari"])) {
     $_SESSION["kcari"] = $_REQUEST["kcari"];
     $_SESSION["fcari"] = $_REQUEST["fcari"];
     $where .= " AND " . $_REQUEST["fcari"] . " LIKE '%" . $_REQUEST["kcari"] . "%'";
 } else {
     $_SESSION["kcari"] = "";
     $_SESSION["fcari"] = "";
 }
 if (isset($_REQUEST["abjad"])) {
     $_SESSION["abjad"] = $_REQUEST["abjad"];
     $where .= " AND a.nama LIKE '" . $_REQUEST['abjad'] . "%'";
 } else {
     $_SESSION["abjad"] = "";
 }
 $total = $dbu->count_record("id", "berita", $where);
 if ($total > 0) {
     $total_pages = ceil($total / $paging);
 } else {
     $total_pages = 0;
 }
 if ($page > $total_pages) {
     $page = $total_pages;
 }
 $start = $paging * $page - $paging;
 // do not put $limit*($page - 1)
 if ($start < 0) {
     $start = 0;
 }
 if ($sidx != "" && $sord != "") {
     $sort = "ORDER BY {$sidx} {$sord}";
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:index.php

示例2: while

									<a href="#"><i style="color:#085f7d;font-size:19px;" class="demo-icon icon-comment">&#xe801;</i> Quote</a>
								</div>
							</div>
						</div> <!-- postlist -->						
						<?php 
//$lalala = "aaa[/qreq]";
//echo strpos($lalala,"[/qreq]");exit;
if ($nkomen > 0) {
    while ($dkomen = $dbu->fetch($rkomen)) {
        $tglpos = explode(" ", $dkomen[tgl_post]);
        $tglpost = $appx->format_date($tglpos[0], $_SESSION[bhs], 'N') . " | " . $tglpos[1];
        $tgljoin = $appx->format_date($dkomen[tgljoin], $_SESSION[bhs], 'N');
        $dkomen[avatar] = $appx->cekFile("/pengguna/avatar/", $dkomen[avatar]);
        $dkomen[avatar] = $app[data_www] . "/pengguna/avatar/" . $dkomen[avatar];
        $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dkomen[username]) . "/";
        $hitJml = $dbu->count_record("SELECT count(id) as jumlah FROM " . $app[table][forum] . " WHERE id_user = '" . $dkomen[id] . "'");
        ?>
						<div class="postlist no-entry add_fix">
							<div class="entry-head">
								<div class="time_post"><?php 
        echo $tglpost;
        ?>
</div>
								<div class="shorcut_post">
									<div class="report"><a href="#"><i style="color:#fff;" class="demo-icon icon-attention">&#xe803;</i></a></div>
								</div>
							</div>
							<div class="author add_fix">
								<div class="circle_pict circle_pict_nf"><a href="<?php 
        echo $linkAva;
        ?>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_thread_article_detail.php

示例3: strtoupper

<body >
	<div class="wrapall">
		<div class="wrapcontent">
			<div class="content add_fix news">
				<div class="head_nf">
					<ul>
						<li <?php 
echo $tabnya == 0 ? 'class="active"' : "";
?>
><a href="<?php 
echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='5' and id_bahasa='" . $_SESSION[bhs] . "'") . "/all/";
?>
">ALL</a></li>
						<?php 
while ($dtab = $dbu->fetch($tabKat)) {
    $hitTab = $dbu->count_record("id", $app[table][berita], " where id_kat ='" . $dtab[id] . "'");
    if ($hitTab > 0) {
        ?>
								<li <?php 
        echo $tabnya == $dtab[id] ? 'class="active"' : "";
        ?>
><a href="<?php 
        echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='5' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dtab[kategori]) . "/";
        ?>
"><?php 
        echo strtoupper($dtab[kategori]);
        ?>
</a></li>
								<?php 
    }
}
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_news.php

示例4:

echo $dbu->lookup('kategori', 'destinasi_kategori', "kategori LIKE '" . $sqlkey_kat . "'");
?>
<span class="border"></span></h1>
					<div class="my_location">
						<div id="gg_loc">						
						</div>
						<p><a id="mappy" href="#" >Show Map</a></p>
					</div>
					<div class="boxcon_search_destination add_fix" style="display:none;">
						<div class="map_search" id="google_map" style="width:100%;margin-right:0;height:400px;"></div>
					</div>
				</div> <!-- .search_destination -->
				<div class="location_destination">					
						<?php 
#--hitung jumlah destinasi di kota
$hitrs = $dbu->count_record("id", "destinasi", "where id_kota ='" . $kotax[id] . "'");
#-- jika $hitrs > 0 (destinasi ada)
//echo "$hitrs";
if ($hitrs and $hitrs > 0) {
    #-- selesksi destinasi 8 record
    $awal = 0;
    $limit = 8;
    $lm = true;
    if ($hitrs < 8) {
        $limit = $hitrs;
        $lm = false;
    }
    ?>
								<h1><?php 
    echo $dbu->lookup("nama", "provinsi", "id='" . $kotax[id_provinsi] . "'");
    ?>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_destinasi_kota.php

示例5:

echo $komm[nama] . $posisinya;
?>
<span class="border"></span></h1>
						<div class="litle_quotes"><img src="<?php 
echo $app[css_www];
?>
/images/ic_q_left.png"><?php 
echo $komm[slogan];
?>
<img src="<?php 
echo $app[css_www];
?>
/images/ic_q_right.png"></div>
						<div class="statictic_community add_fix">
							<span class="ic_m">Member <b><?php 
$jml_ang = $dbu->count_record("id", $app[table][komunitas_pengguna], "where id_komunitas ='" . $komm[id] . "'");
echo $appx->number_to_K($jml_ang);
?>
</b></span>
							<span class="ic_loc">Location <b><?php 
echo $komm[lokasi];
?>
</b></span>
							<span class="ic_link">Website <b><a href="http://<?php 
echo $komm[website];
?>
"><?php 
echo $komm[website];
?>
</a></b></span>
						</div>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_community_detail.php

示例6:

    }
    echo '<li>
										<a href="' . $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='22'") . "/" . $urlx->shortLink($dkat[kategori]) . "/" . '"><div class="bullet-cat-near' . $active . '"><img src="' . $app["data_www"] . '/destinasi_kategori/icon/' . $dkat[icon] . '"></div></a>
										<span class="tip-content">' . $dkat[kategori] . '</span>
									</li>';
}
?>
						</ul>
					</div>
					<?php 
while ($prop = $dbu->fetch($rsprop)) {
    ?>
						
						<?php 
    #--hitung jumlah kota di propinsi
    $hitrs = $dbu->count_record("id", "kota", "where id_provinsi ='" . $prop[id] . "'");
    #-- jika $hitrs > 0 (kota ada)
    //echo "$hitrs";
    if ($hitrs and $hitrs > 0) {
        #-- selesksi kota 8 record
        $awal = 0;
        $limit = 8;
        $lm = true;
        if ($hitrs < 8) {
            $limit = $hitrs;
            $lm = false;
        }
        ?>
								<!-- <h1><?php 
        // echo $prop[nama];
        ?>
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_destinasi_kat.php

示例7: in

	<div class="wrapall">
<div class="wrapcontent">
			<div class="content add_fix">
				<div class="content_category add_fix">
					<div class="tagline">
						<h1>What will</h1>
						<h2>Refreshin</h2>
						<h3>you</h3>
					</div>
					<ul class="destination_category">
					<?php 
while ($deskat = $dbu->fetch($rskat)) {
    ?>
						<li>
							<a href="<?php 
    $jumlah = $dbu->count_record("id", $app[table][destinasi], "where id_kat in (select id from destinasi_kategori where kategori='" . $deskat[kategori] . "')");
    if ($jumlah > 0) {
        echo $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='22'") . "/" . $urlx->shortLink($deskat[kategori]) . "/";
    } else {
        echo "javascript:valid()";
    }
    ?>
">
								<div class="title">
									<span class="border"></span>
									<b><?php 
    echo $deskat[kategori];
    ?>
</b>
								</div>
								<div class="ico_cat"><img src="<?php 
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:fill_home.php

示例8: header

    $p_kota = $_POST[p_kota];
    $p_kate = $_POST[p_kategori];
    //echo $p_negara;exit;
    $lokasi = $app[http] . "/" . $dbu->lookup('nama', 'action', "action='2' and id_bahasa='" . $_SESSION[bhs] . "'") . "/id_" . $dbu->lookup("nama", "kota", "id = '" . $p_kota . "'") . "_" . $urlx->shortLink($dbu->lookup("nama", "provinsi", "id = '" . $p_provinsi . "'")) . "/";
    header('location:' . $lokasi);
    $tambah = "";
    if ($p_negara != "") {
        if ($p_provinsi != "") {
            if ($p_kota != "") {
                if ($p_kate != "") {
                    $p_kate = "AND a.id_kat ='" . $p_kate . "'";
                }
                $sql = "SELECT a.id ,a.id_reff, a.thumb , b.nama FROM " . $app[table][destinasi] . " as a LEFT JOIN " . $app[table][destinasi_bahasa] . " as b ON (a.id_reff = b.id_reff )WHERE  a.id_kota ='" . $p_kota . "' AND status='aktif' " . $p_kate . " ORDER BY b.nama asc LIMIT " . $awal . "," . $limit;
                //print_r($sql);exit;
                $destkota = $dbu->get_recordsetmix($sql);
                $hitrs = $dbu->count_record("id", "destinasi", "where id_kota ='" . $p_kota . "'");
                if ($hitrs and $hitrs > 0) {
                    if ($hitrs < $jml) {
                        $limit = $hitrs;
                        $lm = false;
                    }
                    if ($sub) {
                        $kirim = "_" . $urlx->shortLink($sub);
                    }
                    $outnya .= '<div class="location_destination"><h1>' . $dbu->lookup("nama", "provinsi", "id='" . $p_provinsi . "'") . ", " . $dbu->lookup("nama", "kota", "id='" . $p_kota . "'") . '<span class="border"></span></h1>
									<ul class="list_location" id="' . $urlx->friendlyURL($dbu->lookup("nama", "kota", "id='" . $p_kota . "'")) . '" hitmax="' . $hitrs . '" cast="kota_' . $p_kota . $kirim . '" limit="' . $jml . '">';
                    $outnya .= tujuanDes($destkota, 'provinsi');
                    $outnya .= '</ul>';
                    if ($lm = true and $hitrs > $limit) {
                        $outnya .= '<div class="load_more" rel="kota_' . $urlx->friendlyURL($dbu->lookup("nama", "kota", "id='" . $p_kota . "'")) . '"><a  href="#" id="vm" >View More</a></div>';
                    }
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:coretan_destinasi.php

示例9: header

 } else {
     header("location:" . $app[www] . "/" . $dbu->lookup('nama', 'action', "action='41' and id_bahasa='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($p_id) . "/page-1/");
     //exit;
 }
 $pid = str_replace("-", "%", $p_id);
 $sql = "SELECT a.id, a.judul, a.id_destinasi, a.isi, a.tgl_post, a.tgl_modif as lastUpdate, b.username , b.avatar, b.tgl_post as tgljoin, c.nama as destinasi FROM " . $app[table][forum] . " as a LEFT JOIN " . $app[table][pengguna] . " as b ON(a.id_user = b.id) LEFT JOIN " . $app[table][destinasi] . " as d ON(a.id_destinasi = d.id) LEFT JOIN " . $app[table][destinasi_bahasa] . " as c ON(d.id_reff = c.id_reff) WHERE a.judul LIKE '" . $pid . "' AND c.id_bahasa ='" . $_SESSION[bhs] . "' AND a.tipe ='article' AND a.status ='aktif'";
 //echo $sql;exit;
 $dfa = $dbu->get_recordmix($sql);
 if ($dfa[id] != "") {
     $tglpos = explode(" ", $dfa[tgl_post]);
     $tglpost = $appx->format_date($tglpos[0], $_SESSION[bhs], 'N') . " | " . $tglpos[1];
     $tgljoin = $appx->format_date($dfa[tgljoin], $_SESSION[bhs], 'N');
     $dfa[avatar] = $appx->cekFile("/pengguna/avatar/", $dfa[avatar]);
     $dfa[avatar] = $app[data_www] . "/pengguna/avatar/" . $dfa[avatar];
     $linkAva = $app["www"] . "/" . $dbu->lookup('nama', 'action', "action='8' and id_bahasa ='" . $_SESSION[bhs] . "'") . "/" . $urlx->shortLink($dfa[username]) . "/";
     $hitJml = $dbu->count_record("SELECT count(id) as jumlah FROM " . $app[table][forum] . " WHERE id_user = '" . $_SESSION[member][id] . "'");
     if ($dfa[lastUpdate] != null && $dfa[lastUpdate] != '0000-00-00 00:00:00') {
         $tgledit = explode(" ", $dfa[lastUpdate]);
         $tglEdit = $appx->format_date($tgledit[0], $_SESSION[bhs], 'N') . " " . $tgledit[1];
         $dfa[lastUpdate] = $tglEdit;
     } else {
         $dfa[lastUpdate] = $tglpost;
     }
     #per page komen -----------------------
     $sql = "SELECT a.id,a.id_komen, a.isi , a.tgl_post, a.tgl_modif as lastUpdate, b.username , b.avatar, b.tgl_post as tgljoin FROM " . $app[table][forum_komen] . " as a LEFT JOIN " . $app[table][pengguna] . " as b ON(a.id_user = b.id) WHERE a.id_forum = '" . $dfa[id] . "' AND a.status ='aktif' ORDER BY tgl_post DESC " . $limit;
     //echo $sql; exit;
     $dbu->query($sql, $rkomen, $nkomen);
     #all komen ---------------------------
     $sql = "SELECT count(a.id) FROM " . $app[table][forum_komen] . " as a WHERE a.id_forum = '" . $dfa[id] . "' AND a.status ='aktif' ";
     $hitmax = $dbu->count_record($sql);
     include "fill/fill_thread_article_detail.php";
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:coretan_thread_detail.php

示例10: ON

</h2>
  <br/> 
<form method="post" enctype="multipart/form-data">
<div>
	<div>
	<?php 
$sql = "SELECT a.id, b.nama from " . $app[table][destinasi] . " as a LEFT JOIN " . $app[table][destinasi_bahasa] . "  as b ON(a.id_reff = b.id_reff) LEFT JOIN " . $app[table][komunitas_destinasi] . " as c ON (a.id <> c.id_destinasi) where b.id_bahasa = 'id' AND c.id_komunitas ='" . $p_id . "' order by b.nama ";
//echo $sql;
$dbu->query($sql, $rsp, $nrp);
?>
	<div>destinasi </div>
	<div>
	<?php 
$lock = false;
if ($nrp <= 0) {
    $hit = $dbu->count_record("id", $app[table][komunitas_destinasi], "where id_komunitas ='" . $p_id . "'");
    if ($hit <= 0) {
        $sql = "SELECT a.id, b.nama from " . $app[table][destinasi] . " as a LEFT JOIN " . $app[table][destinasi_bahasa] . "  as b ON(a.id_reff = b.id_reff) where b.id_bahasa = 'id' order by b.nama ";
        //echo $sql;
        $dbu->query($sql, $rsp, $nrp);
    } else {
        $lock = true;
    }
}
if ($lock == false) {
    ?>
	<select name="p_destinasi" id="p_destinasi" >
		<?php 
    while ($frsp = $dbu->fetch($rsp)) {
        ?>
			<option value="<?php 
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:tmp_add.php

示例11: elseif

 } elseif (strlen($pwd_reg) < 6) {
     $_SESSION[msg] .= "{$hitErr} . Password minimal 6 alphanumric char !<br />";
     $hitErr++;
 } elseif ($pwd_reg != $cpwd_reg) {
     $_SESSION[msg] .= "{$hitErr} . Password Confirmation doesnt Match !<br />";
     $hitErr++;
 }
 #cek email
 if ($email_reg == "") {
     $_SESSION[msg] .= "{$hitErr} . Insert your email address!<br />";
     $hitErr++;
 } elseif (!preg_match("/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/", $email_reg)) {
     $_SESSION[msg] .= "{$hitErr} . format email tidak valid !<br />";
     $hitErr++;
 } elseif (preg_match("/([\\w\\-]+\\@[\\w\\-]+\\.[\\w\\-]+)/", $email_reg)) {
     $ada = $dbu->count_record("id", "pengguna", "WHERE email='" . $email_reg . "'");
     if ($ada > 0) {
         $_SESSION[msg] .= "{$hitErr} . email ini sudah terdaftar sebagai member lain !<br />";
         $hitErr++;
     }
 }
 #cek captcha
 //echo $captcha;exit;
 if ($imgSec->check($captcha) == false || $captcha == "") {
     $_SESSION[msg] .= "{$hitErr} . Wrong Captcha (Secutiry Text) !<br />";
     $hitErr++;
 }
 if ($_SESSION[msg] != "") {
     #gagal regis
     header("location:" . $referer);
 } else {
开发者ID:salomay,项目名称:refreshin,代码行数:31,代码来源:index.php


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