There is a sample in the variable.
Tell me how to apply the if/else in sql . For example, if advert.hide='show' , then ..... otherwise otherwise.
$db_query="select * from ".DB_PREF."advert advert" ." where " ." advert.hide='show' " ." and advert.end_putdate > ".$GLOBALS["timeGlobal"]." " ." order by premium_adv DESC, sort_time DESC limit ".KOL_NEW_ADVERT_TO_GLAV;