posted 20 years ago
thanks for replying,
here is my code stat=con.prepareStatement("Select uid from Table1 where qualification=? and location=? and experience=? and salary_range=? and ( skill1=? or skill2=? or skill3=? or skill4=?)");
stat.setString(1,quali2);
stat.setString(2,loc2);
stat.setString(3,exp2);
stat.setString(4,salr2);
stat.setString(5,skill21);
stat.setString(6,skill22);
stat.setString(7,skill23);
stat.setString(8,skill24);
result=stat.executeQuery();
while(result.next())
{
System.out.println("uid="+result.getString(1));
}
----it does'nt give any result means it can'nt find any record satisfying these criateria, but many records satisfying these conditions are there in database.
when i use 'and' once it works, it shows records, but when i use 'and' even twice(also when i use multiple 'and's &'or's) it does'nt give any records,