This example can implement Destoon multi-table query. It has high practical value when conducting secondary development of destroyon. 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== and =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}
Code section
The code to implement the destroyon 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; }
I hope this example will be of some help to everyone's destoon development.