[eluser]Nextneed[/eluser]
hi to all,
i've notice that the following statement
$this->db->distinct("azioni_finanziabili_id");
$this->db->from("azioni_schede_beneficiari_schede");
$this->db->where_in("beneficiari_schede_id", $beneficiari_check);
$azioni_count = $this->db->count_all_results();
produce the following query:
SELECT COUNT(*) AS numrows
FROM (azioni_schede_beneficiari_schede)
WHERE beneficiari_schede_id IN ('65', '67')
and ignore the distinct statement...
if i run the same query instead of counting results i obtain the following...
SELECT DISTINCT *
FROM (azioni_schede_beneficiari_schede)
WHERE beneficiari_schede_id IN ('67', '65')
which is correct...
bye
Luca