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

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

Srinivas Golyalla 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,

Srinivas Golyalla 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

Ar Chron wrote:

Srinivas Golyalla 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,