0 Replies - 1415 Views - Last Post: 07 March 2012 - 01:33 AM Rate Topic: -----

#1 De.camm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 05-March 12

Error when i try to combining 2 form name in if else

Posted 07 March 2012 - 01:33 AM

<p>
<cfquery datasource="RegStudent" name="DisplaySearchingData" >
select * from student
WHERE 1=1
<cfif #Form.SName# NEQ ''>
AND firstname LIKE '%#Form.SName#%'
<cfelse >
AND mykad LIKE '%#Form.MyKad#%'
</cfif>
ORDER BY firstname, lastname
</cfquery>
</p>

Is it any wrong with my coding? if i put else between if command, should i close it with </cfelse>???

Is This A Good Question/Topic? 0
  • +

Page 1 of 1