Ver Mensaje Individual
  #25 (permalink)  
Antiguo 21/09/2009, 05:46
elexavi
 
Fecha de Ingreso: enero-2007
Mensajes: 47
Antigüedad: 17 años, 3 meses
Puntos: 0
Respuesta: ORDER BY me duplica el resultado

Cita:
Iniciado por gnzsoloyo Ver Mensaje
Respecto a:


¿Qué dice el error?
Código:
Error
consulta SQL:  

$query = 'SELECT DISTINCT *FROM ex_awsompxgimagecaptions INNER JOIN ex_posts ON ex_awsompxgimagecaptions.capid = ex_posts.ID WHERE post_type="post" AND post_status="publish"ORDER BY post_date DESC;';



MySQL ha dicho:  

#1064 - 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 '$query = 'SELECT DISTINCT *FROM ex_awsompxgimagecaptions INNER JOIN ex_posts ON ' at line 1
creo que era porq estaba el ORDER BY junto a la ultima condidcion, vamos una tonteria