The user can only be switched if supervisord is run as the root user. If supervisord can’t switch to the specified user, the program will not be started.
function buildLikeWhere($params){
$where = [];
foreach( $parems as $name => $value ){
if($value){
$where[] = "{$name} like \"%{$value}%\"";
}
}
return join(" AND ", $where);
}
$likeWhere = buildLikeWhere([
"model" => makeItSafe( fromPostOrDefault("model", null) ), // функцию makeItSafe надо написать
"detal" => makeItSafe( fromPostOrDefault("detal", null) ), // функцию fromPostOrDefault надо написать
// ... etc
]);
$allWhere = $likeWhere ? " where ".$likeWhere : "";
$sql = "select * from my_table".$allWhere;
wait $!
exit $?
`model` like '%$query%' AND model like '%$query%'
&?