Hello. First of all Happy New Year!
This is korea. I am a zope student. On studying I have two question.

Q1. How call the ZSQLMethod into script python.

Firrst I write the script python named 'myscript' and the ZSQLMethod named 'mySqlMethod'

myscript (script python)************************************************************
 # Example code:
 # Import a standard function, and get the HTML request and response objects.
 from Products.PythonScripts.standard import html_quote
 request = container.REQUEST
 RESPONSE =  request.RESPONSE

 # Return a string identifying this script.

 val = context.mySqlMethod()
        
 print val
 return printed

mySqlMethod (ZSQLMethod)************************************************************

 select * from bbs1 (:bbs1 is the table name of the DB)


How call the 'mySqlMethod'(ZSQLMethod) into 'myscript'(script python) and
how display the query results of ZSQL Method called into script python ?
I called mysqlMethod into the above myscript( val = context.mySqlMethod()).
But I failed.

Q2. How to display the list type data.

myDTMLMethod(DTMLMethod)**************************************************

<dtml-var standard_html_header>
<dtml-var "myScript()">
<dtml-var standard_html_footer>


myscript (script python)**************************************************

 # Example code:
 # Import a standard function, and get the HTML request and response objects.
 from Products.PythonScripts.standard import html_quote
 request = container.REQUEST
 RESPONSE =  request.RESPONSE

 list1=[]

 vala = 100
 valb = 200

 list1.append(vala)
 list1.append(valb)

 return list1

I worte DTMLMethod named 'myDTMLMethod' and script python named 'myscript'
Above myscript return the list type data.
Then how display the returned list type data into the myDTMLMethod?
The question part is <dtml-var "myScript()">
But I failed.

How could I resolve thses questions?
Help me!!
Thank you very much.






   ڸƴ մϴ
---------------------------------------
ų , ݰ ģ, ̰!
ǥ ް Ż   http://game.korea.com


Reply via email to