Home Backend Development PHP Tutorial Destoon实现多表查询示例_php实例

Destoon实现多表查询示例_php实例

Jun 07, 2016 pm 05:16 PM
Inquire

本文示例可实现Destoon多表查询。在进行destoon二次开发的时候有很高的实用价值。具体实现方法如下:

1.模板文件部分

具体代码如下:

<!--{php $tags=tag("table=destoon_member m,destoon_company c&prefix=&condition=m.userid=c.userid and c.groupid=17&pagesize=10&template=null");}--> 
{loop $tags $v} 
<li> 
<div class="dk1bb_t"><a href="#" rel="external nofollow" rel="external nofollow" ><img  src="/static/imghw/default1.png"  data-src="{$v['thumb']}"  class="lazy"thumb']}" border="0"    style="max-width:90%"  style="max-width:90%" / alt="Destoon实现多表查询示例_php实例" ></a></div><div class="dk1bb_b"><a href="#" rel="external nofollow" rel="external nofollow" >{dsubstr($v['company'],18)}</a></div> 
</li> 
{/loop}

Copy after login

2.php代码部分

实现destoon多表查询代码如下:

function getSell($uname){ 
 global $db; 
 $lists = array(); 
 $result = $db->query("SELECT * FROM {$db->pre}sell WHERE username='$uname' limit 0,6"); 
 while($r = $db->fetch_array($result)) { 
 $lists[] = $r; 
 } 
 return $lists; 
}

Copy after login

希望本文示例对大家的destoon开发有一定的帮助作用。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to check your academic qualifications on Xuexin.com How to check your academic qualifications on Xuexin.com Mar 28, 2024 pm 04:31 PM

How to check your academic qualifications on Xuexin.com

12306 How to check historical ticket purchase records How to check historical ticket purchase records 12306 How to check historical ticket purchase records How to check historical ticket purchase records Mar 28, 2024 pm 03:11 PM

12306 How to check historical ticket purchase records How to check historical ticket purchase records

How to check the activation date on Apple mobile phone How to check the activation date on Apple mobile phone Mar 08, 2024 pm 04:07 PM

How to check the activation date on Apple mobile phone

How to use Oracle to query whether a table is locked? How to use Oracle to query whether a table is locked? Mar 06, 2024 am 11:54 AM

How to use Oracle to query whether a table is locked?

Comparison of similarities and differences between MySQL and PL/SQL Comparison of similarities and differences between MySQL and PL/SQL Mar 16, 2024 am 11:15 AM

Comparison of similarities and differences between MySQL and PL/SQL

How to check the latest price of Tongshen Coin? How to check the latest price of Tongshen Coin? Mar 21, 2024 pm 02:46 PM

How to check the latest price of Tongshen Coin?

How to check the latest price of INJ coin? How to check the latest price of INJ coin? Mar 06, 2024 pm 05:00 PM

How to check the latest price of INJ coin?

Discuz database location query skills sharing Discuz database location query skills sharing Mar 10, 2024 pm 01:36 PM

Discuz database location query skills sharing

See all articles