Mic*_*sby 3 php mysql codeigniter
<?=$this->db->count_all_results('users')?>
Run Code Online (Sandbox Code Playgroud)
嗨,我被困在某事上.如何运行如下所示的查询计数并回显所有返回的行?我目前正在使用上述声明,但我需要这种改进.
<?php $aa = $this->db->query("SELECT * FROM users WHERE itemNumber = 1");
Run Code Online (Sandbox Code Playgroud)
使用num_rows()方法
<?php
$aa = $this->db->query("SELECT * FROM users WHERE itemNumber = 1");
echo $aa->num_rows();
?>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11558 次 |
| 最近记录: |