搜索引擎错误PHP和Mysql

Hi Guys I've got a problem in my search engine. Here's the code:

$types = mysql_real_escape_string($_GET['type']);

//Convertion de GET
if ($types = "air") {
    $searchq = "LF";
}elseif ($types = "huile") {
    $searchq = "OF";
}elseif ($types = "carburant") {
    $searchq = "KF";
}elseif ($types = "habitacle") {
    $searchq = "CF";
}elseif ($types = "eau") {
    $searchq = "WF";
}else{
    $searchq = "DF";
}


$searchq = preg_replace("#[^0-9a-z]#i", "", $searchq);
$query = mysql_query("SELECT * FROM tProduct WHERE sSearch LIKE '%$searchq%'") 
    or die("La Recherche est impossible");
$count = mysql_num_rows($query);
$result = mysql_query("SELECT * FROM tProduct WHERE sSearch LIKE '%$searchq%'");

But the problem is that searchq takes only the value of LF.

Where is the problem in my code please?

if ($types == "air") {
    $searchq = "LF";
}elseif ($types == "huile") {
    $searchq = "OF";
}elseif ($types == "carburant") {
    $searchq = "KF";
}elseif ($types == "habitacle") {
    $searchq = "CF";
}elseif ($types == "eau") {
    $searchq = "WF";
}else{
    $searchq = "DF";
}

You are assigning instead of comparing. Use == to compare strings

See documentation here: http://php.net/manual/en/language.operators.comparison.php

A side note, you should switch to PDO or mysqli and use prepared statements. mysql_ functions are deprecated.