Home >Backend Development >PHP Tutorial > ■.lbi中可以执行sql增删查改和php么?■■■,该如何解决

■.lbi中可以执行sql增删查改和php么?■■■,该如何解决

WBOY
WBOYOriginal
2016-06-13 13:46:30774browse

■.lbi中可以执行sql增删查改和php么?■■■
如下图, goods.dwt模板引用了bought_goods.lbi 想让bought_goods.lbi去查询别的表,然后随机的把10多条记录显示出来.怎么实现??思路. 对模板不懂.特意画了图,希望表达准确点.谢过!





------解决方案--------------------
lbi模板里查询不就行了

$a_list = $db->getAll(查询);
$smarty->display();
你是ecshop吧? 参考下goods.php

Statement:
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