Welcome Guest, Not a member yet? Register   Sign In
$this->db->insert creates 3 rows instead of 1. This bug depends from a name of a view (unbelievable but true)
#11

[eluser]CroNiX[/eluser]
Check to see if you are encountering any 404's or redirects during the execution cycle.
#12

[eluser]Chathuranga Tennakoon[/eluser]
i also tried your code. but i didn't get such output as you have mentioned. it gives me only one record in the database.:roll:
#13

[eluser]PaulBY[/eluser]
I looked at the error log:
Code:
[Tue May 08 14:11:24 2012] [error] [client 127.0.0.1]
PHP Fatal error:  Call to a member function load() on a non-object in /home/paul/www/test/system/core/Loader.php on line 579
#14

[eluser]Stefan Hueg[/eluser]
[quote author="PaulBY" date="1336475337"]I looked at the error log:
Code:
[Tue May 08 14:11:24 2012] [error] [client 127.0.0.1]
PHP Fatal error:  Call to a member function load() on a non-object in /home/paul/www/test/system/core/Loader.php on line 579
[/quote]

Which translates to
Code:
$CI->lang->load($langfile, $lang);

in the loader class and means your language class is not loaded properly?!
#15

[eluser]PaulBY[/eluser]
Hm.. I don't use language class in my code.
#16

[eluser]InsiteFX[/eluser]
Check your ./application/config/autoload.php and see if any languages are being autoloaded!
#17

[eluser]PaulBY[/eluser]
There're no languages:
Code:
$autoload['language'] = array();
#18

[eluser]PaulBY[/eluser]
The problem appears when I try to load one view inside the another.
If I load one view there're no problems.

Controller:
Code:
public function quote() {
$this->db->insert('captcha',array('captcha_id'=>'','captcha_time'=>'100500','ip_address'=>'192.168.1.1','word'=>'word'));
$this->load->view('site-request');
    }
View site-request.php:
Code:
<html><body>loreum ipsum

But if I change site-reguest.php to
Code:
<?php $this->load->view('site_before_footer'); ?>
, controllers generates 5 rows in the database instead of 1

site_before_footer.php is too
#19

[eluser]Stefan Hueg[/eluser]
Could you show us your complete view codes please?
#20

[eluser]vrencianz[/eluser]
Just a quick tip. Smile

If you install eclipse pdt you can put a breakpoint to the line containing the 'insert' then analyze the call stack.




Theme © iAndrew 2016 - Forum software by © MyBB