1 (edited by 2013-03-10 06:04:12)

Topic: Restricting Search To A Single Field

Hello

I've looked through the forums and documentation but can't find the answer to this problem, so forgive me if I've missed something:

A client of mine was using CuteNews 1.3 to display notices, and once he built up 30 pages of these he decided he wanted to add a search box. So I added one and we both soon discovered that search.php in 1.3 was less than perfect - that is, it would find some stories but completely miss others; and it would search *all* the text in each story (rather than just a particular field - in this case, we just wanted to search the headline field for matches. then display those headlines and stories in the results).

We were very excited to see that CuteNews 5.2 appears to allow searching just in particular fields - and my client is very happy to pay for a licence once he can be assured this search problem is solved.

But I can't see where I can add a parameter restricting a search query to just titles.

What I mean by this is that at the moment I have a standard search box (same as "Quick Search" in example2.php) that works fine.

But what I want to do is modify this so that whatever is entered into the Quick Search box **only** searches the Title fields of stories

Does anyone have a solution to this?   https://cutephp.com/forum/style_emoticons/default/blink.gif

2 (edited by 2013-03-10 06:23:28)

Re: Restricting Search To A Single Field

D'oh!  When I poked around example2.php a bit more I found the "Advanced" link - and soon after worked out that if I changed

<INPUT type="text" value="" name="story" size=20>

...to...

<INPUT type="text" value="" name="title" size=20>

...I achieved what I wanted to do


Hope this info helps someone else as thick as I am...  https://cutephp.com/forum/style_emoticons/default/wub.gif