How can we see mysql query

HI I m new to ROR…
I m a PHP developer…my query is
like in php when we have to see mysql query we just echo it to see it.
Is there any function - method is in ROR to see what the query is
running rite now.

Manish N. wrote:

HI I m new to ROR…
I m a PHP developer…my query is
like in php when we have to see mysql query we just echo it to see it.
Is there any function - method is in ROR to see what the query is
running rite now.

You can look in the development.log in the log folder.

Peace,
Phillip

You might find it helpful to have the following 4 console windows open
in your dev environment:

mongrel_rails start; if you are using rails
this is where your code will show the debugger if you type debugger
anywhere in the code

cd log; tail -f development.log
to see the log of all the activity as you hit the browser as you code.
This is where the SQL queries will show up as well as any warnings,
code as it is evaluated, etc.

script/console
you want to have the script/console open so that you can easily test
expressions, etc.

path to your app
so that you can run the migrations, rake tasks.