php – 来自数据库的SQL查询
发布时间:2020-12-13 22:23:35 所属栏目:PHP教程 来源:网络整理
导读:我需要一些帮助,如何从sql软查询. 我有一个带有html页面的php脚本,它显示了查询的结果. 我有这个问题: $ready_orders = DB::query( 'SELECT * FROM ordertable where orderid is NOT null ORDER by id DESC')-fetchAll( DB::FETCH_ASSOC ); 从HTML我有这个;
我需要一些帮助,如何从sql软查询.
我有一个带有html页面的php脚本,它显示了查询的结果. 我有这个问题: $ready_orders = DB::query( 'SELECT * FROM ordertable where orderid is NOT null ORDER by id DESC')->fetchAll( DB::FETCH_ASSOC ); 从HTML我有这个; <tal:block tal:condition="exists:orders"> <table> <tr> <td>amount</td> <td> want counter here</td> <td>result 1</td> <td>result 2</td> <td>result 3</td> <td>result 4</td> </tr> <tr tal:repeat="order orders"> <td tal:content=""> .... </td> <td tal:content="order/id"> .... </td> <td tal:content="order/orderid"> .... </td> <td tal:content="order/productid"> .... </td> <td tal:content="order/processed"> .... </td> <td> </td> </tr> </table> 查询正在执行我想要的所有操作,但需要将结果放在列表中. 可能吗? 解决方法
包括一个
select count * from ordertable 然后在第一个中插入此结果 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |