active record con codeigniter
AUTOR PREGUNTA #1
SELECT sum(type) FROM `votes` WHERE questions_id=1
Gracias de antemano
-
¿Tienes la misma pregunta? Yo también
Esto también te interesa!
PREGUNTAS SIMILARES
#2
$this->db->select('SUM(type) as score'); $this->db->where('question_id',1); $q=$this->db->get('votes'); $row=$q->row(); $score=$row->score