Que hago esto?
Código PHP:
<?php
session_start();
// incluimos el archivo de conexion
include ('../../usuarios/reg/config.php');
$id_pastora=$_GET['id_pastora'];
//Obtener anterior imagen
$estructura = "SELECT id_pastora, imagen_pastora FROM galeriapastora WHERE id_pastora < $id_pastora LIMIT 1 ";
$sqlQueryNot = mysql_query($estructura, $db_link) or die(mysql_error());
$rowNot = mysql_fetch_array($sqlQueryNot);
//Obtener actual y siguiente
$estructura2 = "SELECT id_pastora, imagen_pastora FROM galeriapastora WHERE id_pastora >= $id_pastora LIMIT 2";
$sqlQueryNot2 = mysql_query($estructura2, $db_link) or die(mysql_error());
$rowNot2 = mysql_fetch_array($sqlQueryNot2);
echo "<div id=\"verfoto\"><img src=\"".$rowNot['imagen_pastora']."\" border=\"0\" alt=\"Descripcion\" /></div>";
?>
Estoy haciendo el tonto o las dos consultas e de hacerlas asi?