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


PHP xtable::search_sql_get方法代码示例

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


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

示例1: xdb

$tanggal1=gpost('tanggal1',$tgl1);
$tanggal2=gpost('tanggal2',$tgl2);

// Query
$xtable->search_keyon('memberid(ID member)=>aka_siswa.nis:EQ|hrd_pegawai.nip:EQ|pus_member.nid:EQ-0','nama(nama member)=>aka_siswa.nama:LIKE|hrd_pegawai.nama:LIKE|pus_member.nama:LIKE-1');
				
$db=new xdb("pus_peminjaman");
$db->field("pus_peminjaman:replid,member,mtipe","COUNT(pus_peminjaman.member) as cnt","aka_siswa:nis,nama as nsiswa","hrd_pegawai:nip,nama as npegawai","pus_member:nid,nama as nmember");
$db->join("buku","pus_buku");
$db->join("member","aka_siswa");
$db->join("member","hrd_pegawai");
$db->join("member","pus_member");
$db->where($lok==0?"":"pus_buku.lokasi='$lok'");
$db->where_and("pus_peminjaman.tanggal1 >= '$tanggal1'");
$db->where_and("pus_peminjaman.tanggal1 <= '$tanggal2'");
$db->where_and($xtable->search_sql_get());
$db->group("pus_peminjaman.mtipe,pus_peminjaman.member");

$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
$t=$db->query($xtable->pageorder_sql('nis,nip,nid','nsiswa,npegawai,nmember','mtipe','cnt'));

// Page Selection Bar
$PSBar = new PSBar_2(100,450);
$PSBar->begin();
	$PSBar->selection('Statistik',iSelect('statistik',$statistik,$stat,$PSBar->selws,$fmod."_get()"));
	
	if(count($lokasi)>0){
		$PSBar->selection('Lokasi',iSelect('lokasi',$lokasi,$lok,$PSBar->selws,$fmod."_get()"));
	} else {
		$PSBar->end();
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:statistik2.php

示例2:

hiddenval('opf','kat');

if($opt=='af'||$opt=='uf') require_once(VWDIR.'en/katalog_form.php');
else{
// Query
$f=dbTF('pus_katalog:replid,judul,klasifikasi,pengarang,penerbit','pus_klasifikasi:kode as n1,kode','pus_pengarang:nama as n2','pus_penerbit:nama as n3');
$j=dbLJoin('pus_katalog','klasifikasi','pus_klasifikasi','replid');
$j.=dbLJoin('pus_katalog','pengarang','pus_pengarang','replid');
$j.=dbLJoin('pus_katalog','penerbit','pus_penerbit','replid');
$xtable->search_sql_set(array('judul'=>"pus_katalog.judul:LIKE",
			  'kode'=>"pus_klasifikasi.kode:=",
			  'pengarang'=>"pus_pengarang.nama:LIKE",
			  'penerbit'=>"pus_penerbit.nama:LIKE"));

$sql="SELECT ".$f." FROM pus_katalog ".$j." ".$xtable->search_sql_get();
$t=mysql_query($sql);
$xtable->ndata=mysql_num_rows($t);
$t=mysql_query($sql.$xtable->pageorder_sql('judul','n1','n2','n3'));

$xtable->btnbar_begin();
	$xtable->btnbar_add();
	$xtable->search_box();
	//$xtable->btnbar_print();
$xtable->btnbar_end();

$xtable->search_info();

if($xtable->ndata>0){
// Table head
	$xtable->head('@Title','@Classification','@Author','@Publisher');
开发者ID:nickohappy7,项目名称:sister,代码行数:30,代码来源:katalog.php


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