Welcome Guest, Not a member yet? Register   Sign In
New in codeigniter! poll problem
#7

[eluser]benfike[/eluser]
Dont work, I dont know now what is the problem..:S

Now I add this but still dont work :/
Code:
function getAnswers(){
        $data = array();
        $this->db->select('*');
        $this->db->from('votes_answers');
        $this->db->join('votes', 'votes.id = votes_answers.pid');
        $Q = $this->db->get();
        if ($Q-> num_rows() > 0){
            foreach ($Q-> result_array() as $row){
        $data[] = array('answer' => $row['answer'], 'id' => $row['id'], 'votes' => $row['votes'], 'pid' => $row['pid']);
        }
        }
        $Q-> free_result();
        return $data;
    }

Some table name new, because i changed something.

#votes
-id
-name
-status
#votes_answers
-id
-pid (pollID)
-answer
-votes (for results)


Messages In This Thread
New in codeigniter! poll problem - by El Forum - 08-23-2009, 08:48 AM
New in codeigniter! poll problem - by El Forum - 08-23-2009, 09:57 AM
New in codeigniter! poll problem - by El Forum - 08-23-2009, 12:34 PM
New in codeigniter! poll problem - by El Forum - 08-23-2009, 12:45 PM
New in codeigniter! poll problem - by El Forum - 08-23-2009, 02:11 PM
New in codeigniter! poll problem - by El Forum - 08-24-2009, 12:02 AM
New in codeigniter! poll problem - by El Forum - 08-24-2009, 04:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB