$orden = 'order by id';
$reg_gal = mysql_query("SELECT * FROM `galeria_fotos` where mostrar_en_web = 1 and id_tipologia = 1 $orden ;",$link)
or die("Problemas en el select:".mysql_error());
while($row_gal = mysql_fetch_array($reg_gal)) {
?>
$orden = 'order by id';
$reg_gal = mysql_query("SELECT * FROM `galeria_fotos` where mostrar_en_web = 1 and id_tipologia = 2 $orden ;",$link)
or die("Problemas en el select:".mysql_error());
while($row_gal = mysql_fetch_array($reg_gal)) {
?>