-1
My problem is, I’m looking for a query, but I’m not getting all the records, and this is what I’m not getting. I’ll change SQL later, so I left it like this to test. Can someone help me??
this is the Error
WARNING: Mysqli_query() expects parameter 1 to be mysqli, string date in /home/u777508079/public_html/testeConsultar.php on line 19
<?php
$hostname_conexao = "************";
$username_conexao = "***********";
$password_conexao = "***********";
$database_conexao = "*************";
$sql3 = mysqli_connect($hostname_conexao, $username_conexao, $password_conexao, $database_conexao);
//$matricula = $_POST['matricula']; AND morador.id_pessoa = $matricula
$querybanco = mysqli_query( $sql3, "SELECT placa FROM veiculo,morador WHERE morador.id_pessoa = veiculo.id_pessoa ");
$dados = mysqli_fetch_assoc($querybanco);
$placa2 = $dados['placa'];
$link = "SELECT placa FROM veiculo,morador WHERE morador.id_pessoa = veiculo.id_pessoa";
if ($result = mysqli_query($link, $sql3)) {
while ($row = mysqli_fetch_assoc ($result)){
echo $row["placa"];
echo ",";
}
}
?>
Those credentials are right?
– Jéf Bueno
are yes! on the other pages of the program works
– Igor Matsumoto
And will you leave this information in the post? So anyone can access?
– Jéf Bueno
valeu man, I didn’t even stop to think =)
– Igor Matsumoto
@Igormatsumoto other than forums, on this site there is no need to add SOLVED in the title. Although the question is closed, you can still accept the answer given by clicking on
v
to the left of it. Visit [tour] to know how the site works.– user28595