Bueno, teniendo esto:
   
Código php:
Ver original- $id_pastora=$_GET['id_pastora'];  
-   
- //Obtener anterior imagen  
- $estructura = "SELECT id_pastora, imagen_pastora FROM galeriapastora WHERE id_pastora <= $id_pastora LIMIT 1"; 
Si MySQL reporta el siguiente error: 
 Cita:  Error: (SELECT id_pastora, imagen_pastora FROM galeriapastora WHERE id_pastora < LIMIT 1 )You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1
    es porque $id_pastora es nulo, ergo $_GET['id_pastora'] tambien. 
Intenta por favor lo siguiente:   
Código php:
Ver original- if(isset($_GET['id_pastora'])) 
-     $id_pastora=$_GET['id_pastora']; 
- else 
-     die('id_pastora esta vacio');