$kolmodel = $mysqli->prepare("SELECT model, count(model) AS count FROM tech WHERE tech_cat = ? GROUP BY model");
$kolmodel->bind_param("s", $cat_id);
$kolmodel->execute();
$kolmodel->bind_result($model, $count);
while ($kolmodel->fetch()) {
echo $model." - ".$count."<br>";
}
$kolmodel = mysql_query("SELECT model, count(model) AS count FROM tech WHERE tech_cat='".mysql_real_escape_string($cat_id)."' GROUP BY model");
while ($array = mysql_fetch_assoc($kolmodel)) {
echo $array['model']." - ".$array['count']."<br>";
}