Welcome Guest, Not a member yet? Register   Sign In
Help to avoid sql injection attack
#4

[eluser]Bart v B[/eluser]
[quote author="CodeIgniteMe" date="1312784824"]+1 vote for Bart v B's answer.

only trimmed some redundant codes:
Code:
function GetData()
{
    $this->db->select('select title,picture,news');
    $this->db->where('id', $_GET['id']);
    
    $query = $this->db->get('sport');
    
    return $q->result();
}
[/quote]

Pssst... Where is $q comming from? Smile

Code:
function GetData()
{
    $this->db->select('select title,picture,news');
    $this->db->where('id', $_GET['id']);
    
    $query = $this->db->get('sport');
    
    return $query->result();
}


Messages In This Thread
Help to avoid sql injection attack - by El Forum - 08-06-2011, 07:48 PM
Help to avoid sql injection attack - by El Forum - 08-07-2011, 02:11 PM
Help to avoid sql injection attack - by El Forum - 08-07-2011, 07:27 PM
Help to avoid sql injection attack - by El Forum - 08-08-2011, 02:57 PM
Help to avoid sql injection attack - by El Forum - 08-08-2011, 08:09 PM
Help to avoid sql injection attack - by El Forum - 08-08-2011, 08:13 PM
Help to avoid sql injection attack - by El Forum - 08-08-2011, 08:25 PM
Help to avoid sql injection attack - by El Forum - 08-09-2011, 06:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB