when debugging a php application I often echo the SQL statements i
created, so i can copy and paste it for testing it in an sql browser to
find out what went wrong.
Can i do that in rails as wel?
Is there any way to see what sql is being submitted?
when debugging a php application I often echo the SQL statements i
created, so i can copy and paste it for testing it in an sql browser to
find out what went wrong.
Can i do that in rails as wel?
Is there any way to see what sql is being submitted?
Can i do that in rails as wel?
Is there any way to see what sql is being submitted?
While there is probably a way to have the query echoed in your view
(I’m afraid I don’t know what it would be), you can always find it in
your logs. Each time you load a view, the log will print each query
run before the view is rendered. For instance, my development.log is
full of entries like:
...
[4;35;1mUser Load (0.000594)e[0m e[0mSELECT * FROM users WHERE
when debugging a php application I often echo the SQL statements i
created, so i can copy and paste it for testing it in an sql browser to
find out what went wrong.
Can i do that in rails as wel?
Is there any way to see what sql is being submitted?
Watch the log file. If you’re on unix you can “tail -f
path/to/development.log” and you’ll see the SQL that gets run…
when debugging a php application I often echo the SQL statements i
created, so i can copy and paste it for testing it in an sql
browser to
find out what went wrong.
Can i do that in rails as wel?
Is there any way to see what sql is being submitted?
Check the logs in your log directory. You probably want development.log.