Hi ; I have problem with search script ; This is code ;
$search_form = "<form method='get' action='' ><span class='aktif'>Arama</span><input class='aktif' type='text' name='search' ><input class='aktif' type='submit'></form>";
echo $search_form ;
$search = isset($_GET['search']) ? trim($_GET['search']): '';
$a1=(str_replace(' ', '',$search) );
$S1 = ' ';
$S2 = ' ';
$S3 = ' ';
if($search != ''){
// Terimlerin Arama Kısmı
$S1 = sprintf("WHERE Tetik_Ref like '%%%s%%' OR ",mysql_real_escape_string($search));
$S2 = sprintf("Marka_Model like '%%%s%%' OR",mysql_real_escape_string($search));
$S3 = sprintf("Orj_P_N like '%%%s%%'",mysql_real_escape_string($search));
}
//Verilerin yazdırılma işlemi
$main_query = "SELECT * FROM ats_motor $S1 $S2 $S3 ";
$count_query = "SELECT COUNT(*) FROM ats_motor $S1 $S2 $S3 ";
Orj_P_N column inside Original Part Numbers. Its same of "111 11 111" or "15K 1245 45" etc.
When i search exact records work fine. But I search 11111111 nothing found.
I search that and find str_replace function. But i cant use that. Cant import.
I try change line 8 and 14. it give me error.
Can anybody help me ? Thanks.