3

尝试使用提供的电子邮件、密码查询电子邮件列表时发生以下错误。实际上,subscribers_table有 10 列,列名分别为emailpassword

[PSQLException: The column index is out of range: 2, number of columns: 1.]

我的 LoginProcess 模型代码:

    case class LoginProcess(email:String,password:String)

    //error occured in this line
    implicit val getLoginProcessResult = GetResult(r => LoginProcess(r.nextString, r.nextString))

    def check_Login_Success_Query(email: String,password:String) = sql"select email from provisions_schema.subscribers_table where email = $email and password=$password ".as[LoginProcess]

    val login_Success_Query_List = check_Login_Success_Query(email_ip,password_ip).list

    println("login_Success_Query_List.length ->" +login_Success_Query_List.length)
4

1 回答 1

4

你来做这件事:

select email from provisions_schema.subscribers_table

并且模型期望emailpassword。将密码添加到您的查询中

于 2013-10-10T07:24:51.467 回答