• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call a plugin in a library..

#1
[eluser]anggie[/eluser]
I am new to CodeIgniter...
I think I can call a plugin within my library. Am I right?
But I don't know why I cannot get a return data from it?
This is my function..
Code:
function setChaptcha()
    {
        $vals = array(
            'img_path'      => './asset/captcha/',
            'img_url'       => base_url().'/asset/captcha/',
            'expiration'    => 3600,// one hour
            'font_path'         => './system/fonts/georgia.ttf',
            'img_width'         => '150',
            'word'            => random_string('numeric', 6),
        );
        $cap = create_captcha($vals);
        $capdb = array(
                'captcha_id'      => '',
                'captcha_time'    => $cap['time'],
                'ip_address'      => $this->SA->input->ip_address(),
                'word'            => $cap['word']
        );
        $query = $this->SA->db->insert_string('captcha', $capdb);
        $this->SA->db->query($query);
        $data['cap'] = $cap;
        return $data;
    }
The error appear like this...
Code:
A Database Error Occurred

Error Number: 1048

Column 'captcha_time' cannot be null

INSERT INTO captcha (captcha_id, captcha_time, ip_address, word) VALUES ('', NULL, '192.168.10.207', NULL)
I did NOT modify the plugin before...
Could you give me some helps?
Thanks...


Messages In This Thread
Call a plugin in a library.. - by El Forum - 09-23-2008, 08:35 AM
Call a plugin in a library.. - by El Forum - 09-23-2008, 08:42 AM
Call a plugin in a library.. - by El Forum - 09-23-2008, 08:44 AM
Call a plugin in a library.. - by El Forum - 09-23-2008, 08:52 AM
Call a plugin in a library.. - by El Forum - 09-23-2008, 09:02 AM
Call a plugin in a library.. - by El Forum - 09-23-2008, 09:16 AM
Call a plugin in a library.. - by El Forum - 09-23-2008, 09:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.