1
What’s better, close before or after the while?
For example, Modo1:
$sql= "SELECT * FROM tabela";
$rs = mysql_query($sql,$connect);
mysql_close($connect);
while($row = mysql_fetch_array($rs)){
$nome = $row['nome'];
echo $nome;
}
or Modo2:
$sql= "SELECT * FROM tabela";
$rs = mysql_query($sql,$connect);
while($row = mysql_fetch_array($rs)){
$nome = $row['nome'];
echo $nome;
}
mysql_close($connect);
- Close-up before or after while? Modo1 or Modo2?
Best not to use the mysql functions_*
– rray