Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/01/2010, 15:57
tipitolas
 
Fecha de Ingreso: abril-2005
Mensajes: 11
Antigüedad: 19 años
Puntos: 0
Error al intentar ordenar una id en BBDD mysql

Hola a todos,

El motivo de este mensaje es para solicitarles su ayuda. Quiero ordenar unos datos de una tabla y me sale este mensaje:

I cannot execute the query because: 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 'DESC_es' at line 1
And the query is: SELECT id_noticia, titular, parrafo1, imagen FROM noticias ORDER BY id_noticia DESC_es

Comentar que hay dos tablas una es noticias_es y otra noticias_en.

El código es este:

Código:
 <?php
		$a = "SELECT id_noticia, titular, parrafo1, imagen FROM noticias ORDER BY id_noticia DESC" . _LANG;
		$b = mysql_query ($a, $dbh) or die ('I cannot execute the query because: ' . mysql_error () . '<br />And the query is: ' . $a . '<br />');
	?>
Si le suprimo
Código:
ORDER BY id_noticia DESC
funciona pero no me los ordena.

Help me, please

Última edición por tipitolas; 18/01/2010 a las 16:10