Hey there! Sign in to join this conversationNew here? Join for free

Help with the search box

Announcements Posted on
TSR's new app is coming! Sign up here to try it first >> 17-10-2016
    • Thread Starter

    I run into a little problem with my search box, I want it to also work with IDs, lets say you have an online shop with 100 products, it currently works if you type the name/ keywords / part of the name but I want to search by the product's ids..

    I looked around the web and couldn't find anything helpful -.- but I managed to make a second search box that works with IDS but it only works with ids, it doesn't work with names -.-

    I'm using osclass as framework, here is the code for both search boxes:

    Name:  snippet.png
Views: 38
Size:  30.8 KB

    any ideas?

    Just make your SQL query more general. OSClass is doing one under the hood somewhere: just replace it with your own that looks in all the same places + the product id field.
Write a reply…


Submit reply


Thanks for posting! You just need to create an account in order to submit the post
  1. this can't be left blank
    that username has been taken, please choose another Forgotten your password?
  2. this can't be left blank
    this email is already registered. Forgotten your password?
  3. this can't be left blank

    6 characters or longer with both numbers and letters is safer

  4. this can't be left empty
    your full birthday is required
  1. Oops, you need to agree to our Ts&Cs to register
  2. Slide to join now Processing…

Updated: May 11, 2016
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Do you like sleeping in a cold room?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.