Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/10/2008, 14:08
Avatar de arielcasanova
arielcasanova
 
Fecha de Ingreso: octubre-2004
Ubicación: Bahía Blanca - Argentina
Mensajes: 332
Antigüedad: 20 años, 1 mes
Puntos: 1
Respuesta: problema para mostrar imagenes con funciones

por lo pronto, este archivo sí muestra una imagen:

Código:
<?php
	header('Content-Type: image/gif;');
	header('Content-Type: image/jpeg;');	
	include("../../adf/bdADF.php");
	connect_db();
	if(isset($_GET["categoryId"]))
		$pk = $_GET["categoryId"];
	else if(isset($_GET["objectId"]))
		$pk = $_GET["objectId"];
	else if(isset($_GET["workId"]))
		$pk = $_GET["objectId"];
	else if(isset($_GET["newId"]))
		$pk = $_GET["newId"];
	else if(isset($_GET["artistImage"]))
		$pk = $_GET["artistImage"];
	
	$type = $_GET["picType"];
	
	if($type == "on"){
		$query = "select onImage as image from category where category.id = $pk;";
	} else if($type == "off"){
		$query = "select offImage as image from category where category.id = $pk;";
	} else if($type == "th"){
		$query = "select thumbnail as image from category where category.id = $pk;";
	} else if($type == "main"){
		$query = "select mainImage as image from object where object.id = $pk;";
	} else if($type == "th2"){
		$query = "select thumbnail as image from object where object.id = $pk;";
	} else if($type == "wMain"){
		$query = "select mainImage as image from work where work.id = $pk;";
	} else if($type == "wThumb"){
		$query = "select thumbnail as image from work where work.id = $pk;";
	} else if($type == "newsMain"){
		$query = "select mainImage as image from news where news.id = $pk;";
	} else if($type == "artistImage"){
		$query = "select artistImage as image from artist where artist.id = $pk;";
	}

	$result = mysql_query($query);
	//echo $result[0]["image"];
	$array = array();
	while($row = mysql_fetch_assoc($result)){
		$array[] = $row;
	}
	echo $array[0]["image"];
?>

pero no logro encontrar la relación con el que no la muestra y sí debería...
__________________
Ariel Casanova
diseño y desarrollo web estratégico
www.emporia.com.ar