close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search filter doesn't work with 3 entries in database!

Thread begun 2/02/2014 6:06 am by Christopher West | Last modified 2/03/2014 8:09 am by Jason Byrnes | 1342 views | 3 replies |

Christopher WestCommunity Expert

Search filter doesn't work with 3 entries in database!

Hi, if you could look at the code attached. I have setup a search box on the page to filter by email address. Now this code is duplicated exactly the same on my other pages (changing recordsets and session names relevant to that page) and those other pages appear to work how they should (the other pages have at 12 and 233 results and the search result on email address updates the page to the relevant email address - usually 1 result).

However...on the page attached...currently the recordset displays 3 entries. and if i were to search by email address for this page..it doesnt display just the 1 entry...

if for example my 3 entries on the page (before search) were:

email1@example.com
email2@example.com
email3@example.com

I then did a search for email1@example.com then the search result will display the 3 email address

If I then did a search for email2@example.com then the search result will display email2@example.com AND email3@example.com

If I then did a search for email@example.com then the search result will display email2@example.com AND email3@example.com

So it doesnt make sense to me with the above result tests for this page that only contains 3 entries...however the same code works for my other pages with more then 12 results.

Any thoughts on how I have set up the code on the page?

Chris

Attached Files
order-manager.php
Sign in to reply to this post

Jason ByrnesWebAssist

you have an existing where clause on the recordset:
WHERE OrderProcess = 'NEW' OR OrderProcess = 'Failure' OR OrderProcess = 'Cancelled'

use parenthesis around those clauses:
WHERE (OrderProcess = 'NEW' OR OrderProcess = 'Failure' OR OrderProcess = 'Cancelled')

the existing o clauses are causing ambiguous search term by adding parenthesis, the existing or clauses are processed first, then the email address and clause is performed on that result.

Sign in to reply to this post

Christopher WestCommunity Expert

You Sir are amazing! Thank you that solved the issue, greatly appreciated Jason :)

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...