php多个表查询的有关问题

WBOY
Release: 2016-06-13 11:59:54
Original
997 people have browsed it

php多个表查询的问题

<!--{eval $mythread1 = DB::fetch_all('select * from '.DB::table('attachment')." where tid = $tid");}--><br /><br /><!--{loop $mythread1 $key $val}--><br />{$val[id]}<br /><!--{/loop}-->
Copy after login

如何把第一个表读出来的数据放到给第二个用,上边循环出来的id,放到第二个的这里
<!--{eval $mythread = DB::fetch_all('select * from '.DB::table('attachment_这里')." where tid = $tid");  }--><br /><br /><!--{loop $mythread $key $val}--><br />{$val[name]}<br />       <!--{/loop}-->
Copy after login

------解决方案--------------------
眼熟呢...

 

{$val[id]}
嵌套进来

 

{$val[name]}
       

Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!