解释 一下11

解释 一下11

php?name=rails" onclick="tagshow(event)" class="t_tag">rails2.0.2中运行
表: users 字段: id(pk), name, password,power
      1  li  111  admin
      2  wang 111  guest
登陆时,我想判断下是不是admin用户,找到了这句
@User_count = User.count(:conditions => ["power = ?", "admin"])
但是我输入 wang 111 时不我待@User_count = 1
@users = User.find_by_sql(
           ["SELECT name,power " +
    "FROM users " +
    "WHERE name = ? AND password = ? ;", @name, @password]
  )
  p @users  # [#<User name: "wang", power: "guest">]
我想判断权限,想取得power: "guest" 怎么获取?