[Zope] Problem with DTML and JOINS(ZSQL)

Jaroslav Lukesh lukesh at seznam.cz
Tue Apr 15 07:15:30 EDT 2008


Did you try the Test tab at ZSQL method management page? If it does not 
work, you will get error from SQL server. If it works and you does not get 
any data, then your query is not fit to any data.

----- Original Message ----- 
From: member madhangc
To: zope at zope.org
Sent: Tuesday, April 15, 2008 1:08 PM
Subject: [Zope] Problem with DTML and JOINS(ZSQL)


Dear all, I am developing a web application for a biological research 
institute down here in india. I have some
problem in using JOINS. The below is the queries i used,

SQL query

File name : drug
select drug_name,dtype from bio_info_schema.drug order by dtype

File name:drug_gene_details
Note : i used both the sql queries seperately, but neither one worked.

SELECT 
drug.drug_name,drug.route_of_admin,drug.dose_adult,drug.dose_child,drug.adverse_effects,drug_gene.gene_name
FROM drug,drug_gene
WHERE drug.drug_name = drug_gene.drug_name and drug.drug_name=<dtml-sqlvar 
drug_name type=string>

SELECT 
drug.drug_name,drug.route_of_admin,drug.dose_adult,drug.dose_child,drug.adverse_effects,drug.dtype,drug_gene.gene_name
FROM drug INNER JOIN drug_gene
ON drug.drug_name = drug_gene.drug_name AND drug.drug_name=<dtml-sqlvar 
drug_name type=string>




More information about the Zope mailing list