search
Posted: Mon Dec 19, 2011 5:31 pm
Basically, I am searching for specific ids that I have in my db. I am trying to display all of the ids that are in my search field regardless of any letters before or after the number.
so if I am searching for abc55cba I want my results to show record #55, #155, #255, #355, #455, #555...
Currently I can search 55abc and get the results that I want, but if I have any characters before the number, it will not bring back any results.
code:
$ids= $_POST['ids'];
SELECT id,description FROM class WHERE upper(details) LIKE upper('%$ids%') ORDER BY id DESC
so if I am searching for abc55cba I want my results to show record #55, #155, #255, #355, #455, #555...
Currently I can search 55abc and get the results that I want, but if I have any characters before the number, it will not bring back any results.
code:
$ids= $_POST['ids'];
SELECT id,description FROM class WHERE upper(details) LIKE upper('%$ids%') ORDER BY id DESC