Change result=context.LoginScripts.dbcheckUsrPwd(uusr,pwd) to result=context.LoginScripts.dbcheckUsrPwd(usr=uusr,pwd=pwd) It looks weird but that's how it's done. John fowlertrainer@anonym.hu wrote:
Hello ,
My problem is that:
I have ZPT pages, and scripts. I want to check some infos with SQL query.
This an example:
script: ------- ss=context.REQUEST.SESSION r=0 uusr=usr.lower() result=context.LoginScripts.dbcheckUsrPwd(uusr,pwd) if len(result)>0: r=1 ss['userid']=row[0] ss["username"]=usr ss["full username"]=row[1] return(r)
zsql: ----- params: usr,pwd
select * from inst_prguser where webusr=<dtml-sqlvar usr type="string"> and webpwd=<dtml-sqlvar pwd type="string">
The result is: "Missing input variable, usr".
I think this is wrong in zsql - it have wait for dtml-var. But how to I do it in good way to the zsql get good parameters ?
Thanx.