Active Record (Set) Browser issue? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Active Record (Set) Browser issue? (/showthread.php?tid=43533) |
Active Record (Set) Browser issue? - El Forum - 07-15-2011 [eluser]Unknown[/eluser] I am currently building a site that will capture page views and store them in a database. My code seems very straight-forward but the results are questionable... When using Firefox 3.6.18 and Google Chrome 12.0.742.112 I end up with (2) page views added to the database rather than (1). In IE 8.0.7600.16385 it only increases the page views by (1), which is correct. I can't figure out what the difference is but logging in/out doesn't change the results. I'm pretty new to CodeIgniter as well as MVC-logic in general so my debugging abilities are pretty limited. Here's my Controller: Code: public function content() Here's the Model: Code: public function add_view() { And the View: Code: <div id="content_area"> To reiterate the problem: Chrome and FF both add (2) page views to my database when the page is loaded. IE only adds (1) page view. I have no clue why... Any help would be appreciated. |