Answer the question
In order to leave comments, you need to log in
How can I convert a string without using the deletion pattern spec. characters for querying SQL data in Russian?
Hello everyone, DB on utf8. Script too.
There are two queries like this:
$query="SELECT distinct section, city_id FROM `$table` WHERE main_id LIKE '%$main_id%' group by section";
$regs=mysqli_query($link, $query) or die ("Error" . mysqli_error($link));
while($result = mysqli_fetch_assoc($regs))
{
$id=$result['city_id'];
$section=$result['section']; // вот это получаем в $section ="Эвакуация автомобилей | Заказ спецтехники";
//$section=mb_substr($section, 0, 20); - если обрезать строку до пробелов то след. запрос работает
$id=clear_city("$id"); //убрали все лишнее включая пробелы после "г. "
}
$query2="SELECT distinct fullname, section, city_id FROM `$table` WHERE city_id LIKE "%city_id%" AND section LIKE \"%$section%\" group by fullname";
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question