Welcome Guest, Not a member yet? Register   Sign In
error code 1096?
#1

[eluser]tnathos[/eluser]
mmm i dont know for what show me this error if the select works fine..

Code:
function getPreguntas()
    {    
        $this->db->select('idPregunta');
        $this->db->from('jgo_asignadas_prefree');
        $this->db->where('estado','PD');
        $this->db->where('id',$this->session->userdata('id'));
        $query = $this->db->get();    
        if($query->num_rows() > 0){        
            return $this->db->get();
        }
    }

the curious is if quit $query = $this->db->get(); and the (if) and only put return $this->db->get();, yes works... any?
#2

[eluser]tnathos[/eluser]
help me Smile
#3

[eluser]CroNiX[/eluser]
Code:
<?php
function getPreguntas()
{    
    $this->db->select('idPregunta');
    $this->db->from('jgo_asignadas_prefree');
    $this->db->where('estado','PD');
    $this->db->where('id',$this->session->userdata('id'));
    $query = $this->db->get();    
    if($query->num_rows() > 0){        
        return $query;
    }
}
I believe where you issue the $this->db->get(); 2x is causing the error. Just return the result.
#4

[eluser]tnathos[/eluser]
ok works. thanks




Theme © iAndrew 2016 - Forum software by © MyBB