[Zope-DB] How to pass variables?
Chan YH
cyhoong@pc.jaring.my
Thu, 8 May 2003 09:51:52 +0800
Patrick / KKLein
I presumed both of you are on the same project.
I am using zope251 with Postgres722 and do not have experience with MySQL.
Note: in postgres, all the variables are converted into lower case. I am not
sure about MySQL.
Variables are passed to database through zsql method arguments list box.
ZSQL Methods
==========
INSERT INTO student
values
(<dtml-sqlvar student_id type="int">,
.....
);
Args: student_id,.....
------------------------------------
DELETE FROM student
WHERE
<dtml-sqltest student_id type="int">;
Args: student_id
-----------------------------------
UPDATE student
set
Student_ID=<dtml-sqlvar Student_ID type="int">,
Name=<dtml-sqlvar Name type="string">,
Advisor_Name=<dtml-sqlvar Advisor_Name type="string">,
Grade=<dtml-sqlvar Grade type="string">,
Homeroom=<dtml-sqlvar Homeroom type="string">
where student_id=<dtml-sqlvar student_id type="int">
Args: Name, Advisor, Grade, Homeroom
----------------------------------