The following is my DTML code, purposely to valid the entry field and return the right sql method according to the situation:-
 
<dtml-if "_['<dtml-var custname>']!=""" AND "_['<dtml-var custid>']==""">
 
      <dtml-in sqlSearchcust3>
  #// if the custid is blank and cust
name is not blank then will use sqlSearch3
 
<dtml-elif "_['<dtml-var custid>']!=""" AND "_['<dtml-var custname>']==""">
 
       <dtml-in sqlSearchcust2>
  #// if the custid is not blank and custname is blank then will use sqlSearch2
 
<dtml-elif "_['<dtml-var custid>']==""" AND "_['<dtml-var custname>']==""">          
         
       <dtml-in sqlSearchcust>
  #// if the custname is not blank and custid is not blank then will use sqlSearch
<dtml-else>
 
       <dtml-var expr="REQUEST['/Customer/View/searchallcust']">
  #// if the custname is blank and custid is blank then will go to view a list of customer record.
</dtml-if>
 
The following is the ZOPE error:-
Unexpected tag, for tag <dtml-elif "_['<dtml-var custid>']==""" AND "_['<dtml-var custname>']!=""">, on line 9 of a
 
 
For my sql method syntax are as follow:-
 
1.sqlSearchcust3
 
   select *
from customer
<dtml-sqlgroup where>
   <dtml-sqltest custid op=ne type=string>
<dtml-and>
 <dtml-sqltest custname op=like'%%' type=string>
</dtml-sqlgroup>
 
2. sqlSearchcust2
 
select *
from customer
<dtml-sqlgroup where>
   <dtml-sqltest custid op=eq type=string>
<dtml-and>
 <dtml-sqltest custname op=ne type=string>
</dtml-sqlgroup>
3. sqlSearchcust
 
select *
from customer
<dtml-sqlgroup where>
   <dtml-sqltest custid op=eq type=string>
<dtml-and>
 <dtml-sqltest custname op=like'%%' type=string>
</dtml-sqlgroup>
 
This is urgent! Please give me some solution, Thanks!

Reply via email to