← all posts

20 December 2008

Showing SQL Statements in script/console

Today keiran_nz asked how to see SQL statements that occur when running code in script/console. After a little bit of mucking around in the terminal I worked it out to be:

tail -f log/development.log & script/console

The first comment on this post Ashley Williams says you could do:

tail -f log/development.log & clear && script/console

instead, and then goes further and sticks it in an alias in your .bashrc file (presumably):

alias rcon=”tail -f log/development.log & clear && script/console”

— Ryan

Got a thought? Email me or find me on Mastodon.

Before this: Moving on up

After this: Interesting Comparisons