Profiler shows two queries when only one was executed? - 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: Profiler shows two queries when only one was executed? (/showthread.php?tid=58243) |
Profiler shows two queries when only one was executed? - El Forum - 05-26-2013 [eluser]alex646[/eluser] Hey guys, Please help me with the following: CI profiler shows two queries when only one being executed The query code: Code: public function search_user_profile($first_name, $last_name, $work, $school, $place_grewup, $place_last_met, $country_of_birth) { Any input is appreciated! Profiler shows two queries when only one was executed? - El Forum - 05-28-2013 [eluser]rana[/eluser] Can you please share the profiler output as well? Profiler shows two queries when only one was executed? - El Forum - 05-28-2013 [eluser]TheFuzzy0ne[/eluser] If that's the case, you must be running the same query twice. If you do a file search for <your_model>->search_user_profile, you'll be able to spot where it's being called, and check your application flow. I suspect you're calling it twice without realising it. If you're still stuck, please post your controller code. Profiler shows two queries when only one was executed? - El Forum - 05-28-2013 [eluser]alex646[/eluser] Thanks guys! I've tracked the issue down: You are right, I was running two queries at the same time by calling the same function twice : ) |