Smarty的一个有关问题
Jun 13, 2016 am 11:59 AM
Smarty的一个问题
写了一个简单的db类,里面有两个方法,分别返回查询数组
问题是在index里面,实例化db类,调用这两个方法,分别打印出来,但是只能显示一个方法的结果,
要么是分别实例化两次db类,用不同的对象分别访问这两个方法,才能把结果集都打印出来,求解释啊
------解决方案--------------------
结果集已经读到尾部了,再读当然就读不到
你需要先回绕到头再读
select 和 field 方法的开头都需要有 mysql_data_seek($this->re, 0);

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP's big data structure processing skills

How to optimize MySQL query performance in PHP?

How to use MySQL backup and restore in PHP?

What are the application scenarios of Java enumeration types in databases?

How to insert data into a MySQL table using PHP?

How to fix mysql_native_password not loaded errors on MySQL 8.4

How to use MySQL stored procedures in PHP?

Performance optimization strategies for PHP array paging
