Ver Mensaje Individual
  #11 (permalink)  
Antiguo 17/10/2011, 20:29
Avatar de carlos_belisario
carlos_belisario
Colaborador
 
Fecha de Ingreso: abril-2010
Ubicación: Venezuela Maracay Aragua
Mensajes: 3.156
Antigüedad: 14 años, 1 mes
Puntos: 461
Respuesta: Error en sintaxis

viste la estructura del SELECT??
Cita:
Iniciado por manual MySQL
SELECT
[ALL | DISTINCT | DISTINCTROW ]
[HIGH_PRIORITY]
[STRAIGHT_JOIN]
[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
[SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]select_expr, ...
[INTO OUTFILE 'file_name' export_options
| INTO DUMPFILE 'file_name']
[FROM table_references
[WHERE where_definition]
[GROUP BY {col_name | expr | position}
[ASC | DESC], ... [WITH ROLLUP]]
[HAVING where_definition]
[ORDER BY {col_name | expr | position}
[ASC | DESC] , ...]
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
[PROCEDURE procedure_name(argument_list)]
[FOR UPDATE | LOCK IN SHARE MODE]]
si te fijasen una consulta simple primero va el select, luego los campos luego la(s) tabla(s) que vas a utilizar, luego viene el condicional es decir WHERE y luego vienen las clapsulas como ORDER BY, GROU BY, etc, entonces tu consulta deberia de ser
Código MySQL:
Ver original
  1. SELECT campo, campo1,... FROM tabla WHERE campo='loque sea' ORDER BY campo
has la consulta y nos comentas si te funciono, saludos
__________________
aprende d tus errores e incrementa tu conocimientos
it's not a bug, it's an undocumented feature By @David
php the right way