PHP - FOREACH - NO PASA AL OTRO REGISTRO

 
Vista:

FOREACH - NO PASA AL OTRO REGISTRO

Publicado por fede (6 intervenciones) el 08/10/2008 19:16:54
mysql_select_db($database_conn, $conn);
$myquery = sprintf("SELECT FOTOS FROM productos WHERE idartista=$nro order by id asc");
$fotos = mysql_query($myquery, $conn) or die(mysql_error());
$row_fot = mysql_fetch_array($fotos);
$totalRows_fotos = mysql_num_rows($fotos);
//print_r ($fotos);
$nom_foto= $row_fot;
if (count($totalRows_fotos) > 0) {
foreach ($nom_foto as $foti) {
if ( $foti != "nofoto.jpg"){
unlink("../fotos/". $foti);
unlink("../thumbs/". $foti);
}
}
}
SUPONGAMOS Q LA CONSULTA ME TRAE DOS REGISTROS 14.JPG Y 15.JPG.
EN EL UNLINK SOLO ME ELIMINA 14.JPG NO PASA AL OTRO REGISTRO
ESTARA BIEN EL FOREACH?
GRACIAS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder