I have table with these fields article name, article ID and Article Color, Size.
I want to write a find function with any of the above field.
I will give one example
supposes after clicking find a user enters article color as RED and then hits return. The other 3 fields will auto populate with the corresponding data. After which if the user clicks it will continue to show other articles which has color RED. I want to be able to this with other field also like size . I just want a general way on how to do this as experimenting ways will be time consuming
Thank you

I am presuming you are using a SQL database here, so why not create a fulltext index for the fields you want to query. Then use 'contains' to search the fulltext index.

Any other way will involve table scanning multiple fields with a 'like' statement which just isnt cost effective in terms of performance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.