How do I return an integer value for the rows returned in the select?
$query = $this->db->where("categoria_titulo", $categoria);
$query = $this->db->get("categorias");
$query = $query->num_rows();
echo $query;
How do I return an integer value for the rows returned in the select?
$query = $this->db->where("categoria_titulo", $categoria);
$query = $this->db->get("categorias");
$query = $query->num_rows();
echo $query;
Set a variable for the number of records search:
$query = $this->db->where("categoria_titulo", $categoria);
$query = $this->db->get("categorias");
$query_num = $query->num_rows();
echo $query_num;
Or do
$query = $this->db->where("categoria_titulo", $categoria);
$query = $this->db->get("categorias");
return $query->num_rows();