Message
picture attached
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'nin%' and cscart_product_feature_variants.feature_id=2' at line 1 (1064)SELECT * FROM `cscart_product_feature_variants` INNER JOIN `cscart_product_feature_variant_descriptions` on cscart_product_feature_variants.variant_id=cscart_product_feature_variant_descriptions.variant_id WHERE cscart_product_feature_variant_descriptions.variant LIKE '%kelime'nin%' and cscart_product_feature_variants.feature_id=2
function fn_yazar_ver($deger){
$result = db_query(“SELECT
?:product_feature_variant_descriptions.variant,
?:product_feature_variants.variant_id,
?:product_feature_variants.feature_id
FROM ?:product_feature_variants
INNER JOIN
?:product_feature_variant_descriptions ON
?:product_feature_variant_descriptions.variant_id =
?:product_feature_variants.variant_id
WHERE ?:product_feature_variants.feature_id=2 order by ?:product_feature_variant_descriptions.variant ASC”);
return $result;
}function fn_yazar_search($like){
$result = db_query(“SELECT *
FROM?:product_feature_variants
INNER JOIN?:product_feature_variant_descriptions
on ?:product_feature_variants.variant_id=?:product_feature_variant_descriptions.variant_id
WHERE ?:product_feature_variant_descriptions.variant LIKE '%”.$like.“%’ and ?:product_feature_variants.feature_id=2”);
return $result;
}$variants = array(); $searchs = array(); $publisher = array(); $harf = strtoupper ($_GET['harf']);
if (!empty($_GET[“yazar”])) {
$search = fn_yazar_search($_GET[‘yazar’]);
foreach($search as $variant){
$searchs[mb_substr(strtoupper ($variant[‘variant’]), 0, 1)][] = $variant;
}
}if($harf){ $degergeldi = fn_yazar_ver($deger); foreach ($degergeldi as $variant) { $string = mb_substr(strtoupper ($variant['variant']), 0, 1); if(is_numeric($string)){ $variants['0-9'][] = $variant; }else{ $variants[$string][] = $variant; } if($harf == '0-9'){ if(is_numeric($string)){ $publisher['0-9'][] = $variant; } }elseif($harf == $string){ $publisher[$harf][] = $variant; } sort(); } }else{ $degergeldi = fn_yazar_ver($deger); foreach ($degergeldi as $variant){ $string = mb_substr($variant['variant'], 0, 1); if(is_numeric($string)){ $variants['0-9'][] = $variant; }else{ $variants[mb_substr(strtoupper ($variant['variant']), 0, 1)][] = $variant; } sort(); } } Tygh::$app['view']->assign('publisher', $publisher); Tygh::$app['view']->assign('names', $harf); Tygh::$app['view']->assign('searchs', $searchs); Tygh::$app['view']->assign('variants', $variants);