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.


FROM drug,drug_gene
WHERE drug.drug_name = drug_gene.drug_name and drug.drug_name=<dtml-sqlvar
drug_name type=string>

FROM drug INNER JOIN drug_gene
ON drug.drug_name = drug_gene.drug_name AND drug.drug_name=<dtml-sqlvar
drug_name type=string>

Below is the DTML code i have used,

*File name : view_drug_detail*
<table width = 30% border = 1 >
<!-- Table header -->
<th>Drug Name</th>
<!-- Iterate through drug details using dtml-in tag -->
<dtml-in drug>
<!-- for each drug , print out the drug name and type of drug -->
<td align = center>
<a href="http://localhost:8080/ddrd/ddrtb/drugs/display_drugs/*
drug_gene_details*/drug_name/<dtml-var drug_name>/*view_drug_info*"><dtml-var

*File name : view_drug_info*
<h3><font color= #008000><center>Drug Information
<table width = 100% border = 1 align=center>
<th>Drug name</th><td><dtml-var drug_name></td>
<th>Route of Administration</th><td><dtml-var route_of_admin></td>
<th>Dosage (Adult)</th><td><dtml-var dose_adult></td>
<th>Dosage (Child)</th><td><dtml-var dose_child></td>
<th>Adverse Effects</th><td><dtml-var adverse_effects></td>
<th>Drug Type</th><td><dtml-var dtype></td>
<th>Drug Targets</th><td><dtml-var gene_name></td>

This is the error which i got.

Site Error

An error was encountered while publishing this resource.
Sorry, a site error occurred.
Traceback (innermost last):
    * Module ZPublisher.Publish, line 150, in publish_module
    * Module ZPublisher.Publish, line 114, in publish
    * Module Zope, line 134, in zpublisher_exception_hook
    * Module Shared.DC.ZRDB.DA, line 547, in __getattr__
KeyError: _r
Troubleshooting Suggestions
    * The URL may be incorrect.
    * The parameters passed to this resource may be incorrect.
    * A resource that this resource relies on may be encountering an error.
For more detailed information about the error, please refer to the HTML
source for this page.
If the error persists please contact the site maintainer. Thank you for your

Any kind of suggestion and help will be very useful. Thanks in advance.

Best Regards

Things must be learned only to be unlearned again or, more likely, to be
-- Richard Feynman
Zope maillist  -
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to