| 域名空间 下载中心 社区论坛 信息公告 my小屋 |
![]() |
联系我们 设为首页 加入收藏 |
|
首页 | 新闻资讯 | 编程开发 | 网页设计 | 图形图象 | 网络媒体 | 网站模板 | 数 据 库 | 投稿 论坛 | 操作系统 | 系统优化 | 网络安全 | 黑客技术 | 硬件学堂 | 硬件报价 | 服 务 器 | 地图 专题 | 应用软件 | 聊天通讯 | q q 专栏 | 建站经验 | 在线工具 | 站长club | 注 册 表 | 旧版 社会 | 游戏娱乐 | 设计欣赏 | 疑难解答 | 社区论坛 | 韩国素材 | 素材图库 | 广告服务 | 服务 |
| 新版上线![旧版] | |||||
注:打开慢时请稍等
1:adodb 中getall 的问题2:smarty中下拉框动态显示的问题http://www.iyit.net 日期:2006-10-6 15:37:53 来源:iyit.net收集 点击: |
1、getall 方法期望返回一个数组,不成功时返回假 实用时宜 $queryc="select count(*) from table1"; if($result=$db->getall($query)){ //成功时的操作 } 2、见手册中的例子,当然选中项你要适当保存 index.php: require('smarty.class.php'); $smarty = new smarty; $smarty->assign('cust_ids', array(1000,1001,1002,1003)); $smarty->assign('cust_names', array('joe schmoe','jack smith','jane johnson','carlie brown')); $smarty->assign('customer_id', 1001); //设置默认选项 $smarty->display('index.tpl'); index.tpl: <select name=customer_id> {html_options values=$cust_ids selected=$customer_id output=$cust_names} </select> index.php: require('smarty.class.php'); $smarty = new smarty; $smarty->assign('cust_options', array( 1001 => 'joe schmoe', 1002 => 'jack smith', 1003 => 'jane johnson', 1004 => 'charlie brown')); $smarty->assign('customer_id', 1001); $smarty->display('index.tpl'); index.tpl: <select name=customer_id> {html_options options=$cust_options selected=$customer_id} </select> output: (both examples) <select name=customer_id> <option value="1000">joe schmoe</option> <option value="1001" selected="selected">jack smith</option> <option value="1002">jane johnson</option> <option value="1003">charlie brown</option> </select> 编辑:黑鹰 [发送给好友] [打印本页] [关闭窗口] [返回顶部] 上一篇:字符串最后一个字符是什么? 下一篇:关于生成csv文件的一个问题,请高手解答,谢谢 转载请注明来源:www.iyit.net 特别声明: 本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。 |
| 相关文章 | ||||
| 设置首 页 - 版权声明 - 广告服务 - 关于我们 - 联系我们 - 友情连接 |
| |||||||