Welcome Guest, Not a member yet? Register   Sign In
View Active Record Query String?
#1

[eluser]jpschroeder[/eluser]
Is it possible to view the actually query string that is generated by activerecord? I would like to be able to see what is actually being run in certain circumstances. Example:

Code:
$this->db->select("*");
$this->db->from("checklist");
$this->db->join("checklist_progress","checklist_progress.checklist_item = checklist.id");
$this->db->where("user",$user);

Now I want to actually see what that creates as a query string. Any love?
#2

[eluser]jcavard[/eluser]
here's some love <3
#3

[eluser]Krzemo[/eluser]
http://ellislab.com/forums/viewthread/96428/

Smile
#4

[eluser]Travis O[/eluser]
You could also use profiling to display the query as it is run on the page.

http://ellislab.com/codeigniter/user-gui...iling.html
#5

[eluser]jpschroeder[/eluser]
thanks guys. I searched the forums and didn't find that one. Appreciate it!
#6

[eluser]jcavard[/eluser]
[quote author="Travis O" date="1249512308"]You could also use profiling to display the query as it is run on the page.

http://ellislab.com/codeigniter/user-gui...iling.html[/quote]
the profiling is really useful, but I was not aware of this one
Code:
$this->db->_compile_select();
and that is mervelous!
thanks




Theme © iAndrew 2016 - Forum software by © MyBB