Query

‘Teacher’ is a table in a database. Based on that information,
explain what the following query is searching for in the table:
Teacher.find(:all, :condition => { :grade => 9…12})

Teacher.find(:all, :condition => { :grade => 9…12})

This means getting all records from teacher table teachers where 

column grade has value between 9 & 12.

select * from teachers where grade between 9 and 12

Sijo

Thank You Sijo

Srinivas G. wrote:

�Teacher� is a table in a database. Based on that information,
explain what the following query is searching for in the table:
Teacher.find(:all, :condition => { :grade => 9…12})

Do your own homework.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

It would be a better practice to include all column names in the Select
instead of *

On Sat, Jun 5, 2010 at 3:29 PM, Srinivas G.
[email protected]wrote:

Sijo
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Sanjay Sarachandrakumaran

Follow me
http://www.twitter.com/ssarachandra

Ar Chron wrote:

Srinivas G. wrote:

�Teacher� is a table in a database. Based on that information,
explain what the following query is searching for in the table:
Teacher.find(:all, :condition => { :grade => 9…12})

this query returns an uneducated student named srinivas

Well said!

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Srinivas G. wrote:

�Teacher� is a table in a database. Based on that information,
explain what the following query is searching for in the table:
Teacher.find(:all, :condition => { :grade => 9…12})

this query returns an uneducated student named srinivas