******************************************************************/
function rows($opt=array()) {
- $select_count = ( (false and $this->db->type =='mysql') ? " SQL_CALC_FOUND_ROWS" : "");
//
// Select
//
+ $where = $this->where_criterias($this->p(),$this->p('op'));
+ $select_count = ( (!$where and $this->db->type =='mysql') ? " SQL_CALC_FOUND_ROWS" : "");
+
$sql = "SELECT$select_count *" . $this->select_extras();
$sql .= " FROM ".$this->sql_name();
- $where = $this->where_criterias($this->p(),$this->p('op'));
+
$this->sql = $sql = $sql . $where;
$this->debug($sql,1);