Posts by David B G Dutra • 91 points
3 posts
-
1
votes1
answer53
viewsA: I want the result of a query and SQL is simple...in PHP is confusing
$resultado = mysqli_query($this->conexao, "Select descricao from tabela where codigo = 1"); $linha = mysqli_fetch_assoc($resultado); echo $linha['descricao'];
-
4
votes1
answer770
viewsA: Strategy Pattern with Spring Boot
Here’s an alternative. I hope it helps! Interface: public interface UserService { User getById(Integer id); } Implementations: @Bean(name = "userLocalService") public class UserServiceImpl…
-
1
votes2
answers247
viewsA: Query in the same table
Follows an alternative: SELECT registro FROM trabalhador WHERE registro IN (SELECT registro FROM trabalhador WHERE evento = 'e1') AND registro IN (SELECT registro FROM trabalhador WHERE evento =…