Hello Eric, thank you for your reply.
Actually the instructions provided are not working with my code.
I will try to indicate more details for a better understanding.
The codes below are an example of what king of data I have on products table:
W 706
9 F-347
GFE 101
SA-156-A
CE 213 A/2
CE 487 A/2
AC - 1001 - 01
as you can see, the codes stored in database include spaces, - and /. Those characters should be "removed" during the search but not from the search result.
Let's say I use this search criteria: AC1001
The search result should indicate the following result:
AC - 1001 - 01
Another search criteria example: CEA2
CE 213 A/2
CE 487 A/2
Another search criteria example: CE213A2
CE 213 A/2
In this way, more accurate is the search criteria, more accurate is the result without the risk to miss the code.
I also send you the SQL file with few table rows to speedy your testing, if you would like to:
mp_2009-09-30.sql.html
This is the query I have on page and the 2 lines generated from Data Assist Search Wizard:
$query_duxProdotti = "SELECT duxProdotti.id, duxAziende.azienda AS aziendaID, duxProdotti.codOriginale, duxProdotti.codMP FROM duxProdotti LEFT JOIN duxAziende ON duxProdotti.aziendaID = duxAziende.id";
$WADbSearch1->keywordComparison($KeyArr0,"".((isset($_POST["cod_originale"]))?$_POST["cod_originale"]:"") ."","AND","Includes",",%20","%20","%22","%22",0);
$WADbSearch1->keywordComparison($KeyArr1,"".((isset($_POST["cod_mp"]))?$_POST["cod_mp"]:"") ."","OR","Includes",",%20","%20","%22","%22",0);