2
I have an sql table as follows:
usuario
(`matricula` varchar(20) not null primary key,
`nome` varchar(45) NOT NULL,
`senha` varchar(15) NOT NULL);
In php I’m trying to get the name of a user who has the license plate specified by mysqli
:
$nomeUsuario = mysqli_query($conexao, "SELECT nome FROM usuario WHERE matricula = $matricula");
But it’s not working very well, even using the mysqli_fetch_assoc
.
Any idea what’s wrong?
Hello @Amanda, Welcome to Sopt, before you start a look at our [Tour] -- Your code shows some error? If yes is worth asking the question. How are you using the variable
$nomeUsuario
?, To$conexao
this ok?, This information will help the community better understand their problem. = D– Icaro Martins