Re: Writing a SQL Query in Active Record?
by Phillip Gawlowski other posts by this author
May 8 2008 10:40AM messages near this date
Re: Writing a SQL Query in Active Record?
|
integers with preceding zero don't return as expected?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anukul Singhal wrote:
| I am not using rails. Want to run the query only using Active Record on
| Ruby (Scite Editor)
Yes, that is what ActiveRecord's #find and #find_by_sql methods do.
Rails uses ActiveRecord, but ActiveRecord works without using Rails itself.
| Can you give any prototype as to how I can proceed writing a simple
| "SELECT" query after establishing the connection with the sql server db?
class Table < ActiveRecord::Base; end
select = Table.find :all
- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com
~ How many boards would the Mongols hoard if the Mongol hordes got bored?
-- Calvin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkgjOwUACgkQbtAgaoJTgL8NVQCgpLIP+PbwTxDnEhXiXDg3sLlc
gy0An3GewesORQjT2Q7uQlvbEpUuRyi4
=8Svr
-----END PGP SIGNATURE-----
Thread:
Anukul Singhal
Phillip Gawlowski
Simon Krahnke
Phillip Gawlowski
Anukul Singhal
Phillip Gawlowski
|