Intendi sim... Cara aki na minha casa funcionou.... toma ae os fontes...
<?
// Valores para teste
$id =4; // Amigo segundo meus valores de teste deu tudo certo!!!
$evento="A"; // // teste depois você comenta!!! isso
//-------------------
//$id = $_GET["id"]; //tire esses comentarios
//$evento=$_GET["evento"]; // Daki para funcionar no seu programa!
$conexao= mysql_connect("localhost","root","") or print mysql_error();
mysql_select_db("teste",$conexao) or print mysql_error();
$sql= "SELECT * FROM fotos WHERE idfoto=$id OR evento='$evento'";
echo $sql;
$exe= mysql_query($sql,$conexao) or print mysql_error();
while ($linha= mysql_fetch_array($exe)){
$foto = $linha["foto"];
echo "<div align='center'><img src='$foto' border='0' width='380' height='285'></div>";
}
?>
qualquer coisa posta ae... fallou...