I have a cookie that contains the value of an psql key as its value. I want to retrieve the value and use it to call the psql query method to retrieve the data. The code that I am currently using is <dtml-in qryGetCustomer(REQUEST.cookies[Company_Name)]> The company record has been retrieved for <dtml-var company_name>.<br> </dtml-in> where Company_Name is a property containing the company name and is the name of the cookie, and company_name is the first field that should be retrieved from the psql database query. When I run the code I get Error Type: KeyError Error Value: qryGetCustomer(REQUEST.cookies[Company_Name)] Any help out there on helping a Zope newbie to get the data from his psql database with a value retrieved from a cookie? -- Jim Zope is cool!
Jim wrote:
I have a cookie that contains the value of an psql key as its value. I want to retrieve the value and use it to call the psql query method to retrieve the data. The code that I am currently using is
<dtml-in qryGetCustomer(REQUEST.cookies[Company_Name)]>
try quotes: <dtml-in "qryGetCustomer(REQUEST.cookies[Company_Name])">
The company record has been retrieved for <dtml-var company_name>.<br> </dtml-in>
----- Hannu
Hi! On Wed, 24 May 2000, Jim wrote:
<dtml-in qryGetCustomer(REQUEST.cookies[Company_Name)]>
Correct syntax is <dtml-in "qryGetCustomer(REQUEST.cookies[Company_Name)]">, but I guess you need to learn any Session Product. There are two of them - SQLSession and FSSession. Probably, SQLSession is your way to go... Oleg. (All opinions are mine and not of my employer) ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
participants (3)
-
Hannu Krosing -
Jim -
Oleg Broytmann