• Post Reply Bookmark Topic Watch Topic
  • New Topic

Search query for File Path  RSS feed

 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have file path in my table(mysql). I am using search functionality which search the file path according different criteria.

where first match is for locale 2nd for item and last for file name. I am stuck at last match where DCRPath LIKE '%data%' which is for file name. It showing some undesirable result.


I understand why this is wrong, but what can be the right query for this.
 
Paul Clapham
Sheriff
Posts: 22719
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain what is wrong and/or undesirable about that list? Each of the entries in it does match your query, so what's wrong with that? (Note: I don't understand why you say %data% is for "file name" when it clearly means "anything containing the string 'data'".)
 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are right. There should no result come as there is no file which contains the "data" . if i place "Gfr" it should display one record only as in last row.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vivek dhiman wrote:you are right. There should no result come as there is no file which contains the "data" . if i place "Gfr" it should display one record only as in last row.

Not really. In fact all your files contain "data"
/templatedata/composite-item/gallery/data/3_Local/EU/fr_BE/Electronics/sw_fr_BE_7931

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!