1
I was trying to list a result of a select within another while but it only runs the second while once. That’s what I tried to do.
$lojas = query("Select cliente,endereco_cliente,cidade_cliente,uf_cliente,cep_cliente,cnpj_cliente from cliente LIMIT 4;");
while (($dados = fgetcsv($fp, 0, ";")) !== FALSE) {
$quant_campos = count($dados);
for ($i = 0; $i < $quant_campos; $i++) {
echo "</br>".$dados[$i];
while ($row = $lojas->fetch_assoc()) {
echo "</br>BD:".$row['cnpj_cliente'];
}
}
echo count($dados);
}
Sure you have more than one store in the return of your select?
– Math