谁能帮我写出正确的WHERE AND
条件?或者如果它是正确的,有什么区别?
1.
get_primary_status = Trustee.select(:id).where(:secret_key => seckey, :user_id => user_id, :primary_trustee => '1')
2.
get_primary_status = Trustee.select(:id).where(:secret_key => seckey).where(:user_id => user_id).where(:primary_trustee => '1')
3.
get_primary_status = Trustee.select(:id).where('secret_key = (?) AND user_id = (?) AND primary_trustee = (?)', seckey, user, '1')