[HOME]

Path : /home/hermanostamargo/ftp/landing/
Upload :
Current File : /home/hermanostamargo/ftp/landing/sql.php

<?php
// textos
for($x = 0; $x < $arrlength; $x++) {
	if ( $languages[$x][2] == 1 ) {
		if ( $idioma == $languages[$x][0] ) {
			
			$sql_landing = "SELECT 
					serv.id AS serv_id,
					serv.fichero,
					serv.titulo_{$languages[$x][0]} AS titulo,
					serv.descripcion_{$languages[$x][0]} AS descripcion,
					serv.title_{$languages[$x][0]} AS title,
					serv.description_{$languages[$x][0]} AS description					
				FROM {$tabla_bd} AS serv
				WHERE visible=1 
					";

    	}
	}
}

//echo $sql_landing;

$res_landing = mysqli_query($conn,$sql_landing);
$row_landing = mysqli_fetch_array($res_landing);
//para metas y breadcrumb
$res2 = mysqli_query($conn,$sql_landing);
$row = mysqli_fetch_array($res2);
$titulo = $row['titulo'];
$title = $row['title'];
$description = $row['description'];

$idcarga = $row_landing['serv_id'];

for($x = 0; $x < $arrlength; $x++) {
	if ( $languages[$x][2] == 1 ) {
		if ( $idioma == $languages[$x][0] ) {
    		//imagenes
			$sql_img = "SELECT 
							id, 
							imagen, 
							imagen_thumb, 
							imagen_med, 
							leyenda_{$languages[$x][0]} AS leyenda 
						FROM {$tabla_bd}fotos WHERE idfamilia={$idcarga} ORDER by orden ASC";

    	}
	}
}

$res_img = mysqli_query($conn,$sql_img);
$res_img2 = mysqli_query($conn,$sql_img);

echo mysqli_error($conn);
?>