Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    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: 56
Size:  30.8 KB


    any ideas?
    Offline

    17
    ReputationRep:
    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.
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Brexit voters: Do you stand by your vote?
    Useful resources
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • 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

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