View Single Post
  #1 (permalink)  
Old 10-30-2007, 05:45 PM
clone45 clone45 is offline
Junior Member
 
Join Date: Jul 2007
Posts: 11
Default fetchAll works, but fetchOne and fetchRow do not...

Hello! I'm having some difficulties getting fetchOne() and fetchRow() to work. Here's my code..
$sql = "SELECT Count(*) as row_count FROM $table_name $where";
$row_count = $this->db->fetchOne($sql);
The error I get is: Fatal error: Call to undefined method DB_mysql::fetchOne()

If I change it to fetchAll(), it works just fine.

Any ideas?

Thanks!
- Bret
Reply With Quote