Does anybody have any ideas of how to make an advanced search function?
I would like to accept a string as the search query. i want it to run a query on the string as a whole, and for each word in the query.

The problem is here:
The results need to be paginated, but it is difficult to paginate more than one query's results into multiple pages. you would be using arrays right? and each result gets put into the array, and no results are duplicated. this is what would be hard to paginate.

is there a better way to do this?

at least it is unapparent to me as to how it would be done.

google is a great example... go figure.

any help would be great guys, thanks.

You may be able to do a single query using OR in the where clause, and DISTINCT in the SELECT clause. For example:

SELECT DISTINCT comment_id, comment_title, comment_description FROM comments WHERE comment_description LIKE '%Hello World%' OR comment_description LIKE '%Hello%' OR comment_description LIKE '%World%'

That kind of query is possible? omg you made my day. thank you so much... i stoped working on my paginator last night to sleep on the problem. and i was hoping there was some sort of solution like you described. thank you!

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.