Home > Backend Development > PHP Tutorial > Destoon implementation example of multi-table query, Destoon implementation example_PHP tutorial

Destoon implementation example of multi-table query, Destoon implementation example_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:20:22
Original
1243 people have browsed it

Destoon implementation example of multi-table query, Destoon implementation example

The example in this article can implement Destoon multi-table query. It has high practical value when carrying out secondary development of destoon. The specific implementation method is as follows:

1. Template file part

The specific code is as follows:

<!--{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="{$v['thumb']}" border="0" width="120" height="92" /></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 code part

The code to implement destoon multi-table query is as follows:

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

I hope the examples in this article will be helpful to everyone’s destoon development.

destoon double table query question tutorial: how to query the content of the article and keep the format unchanged

{loop $tags $k $t}

{$t[title]}

{$t[content]}{/loop}

destoon administrator emergency help, label explains how to call multiple tables

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template