+
+ /**
+ * Is there at least one row?
+ *
+ * @return bool
+ */
+ public function hasRows() {
+ # Little hack...
+ $limit = $this->limit;
+ $this->limit = 1;
+ $res = $this->db->query( $this->getQuery() );
+ $this->limit = $limit;
+ $ret = $this->db->numRows( $res ) > 0;
+ $this->db->freeResult( $res );
+ return $ret;
+ }
+