![]() |
Ordenar Descendente por id Pues eso me gustaria ordenar un listado que he hecho descendentemente por el campo "id" que es la clave primaria y autoincrementable, el problema que yo pongo en la consulta select * from peliculas ORDER BY id DSC, pero no funciona me da este error Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/sites/1/iespana.es/a/l/alllebor/site/peli/consultar.php on line 25 Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /www/sites/1/iespana.es/a/l/alllebor/site/peli/consultar.php on line 28 Aqui os pongo el codigo <?php include("conex.php"); $link=Conectarse(); $result=mysql_query("select * from peliculas ORDER BY id DSC",$link); ?> </p> <table border="1" bordercolor="#000000"> <tr><td> <a href="insertar.php">Administrador</a></td></tr></table> <p> </p> <TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1> <TR align="center"><TD width="109"><strong> Título</strong></TD> <TD width="140"><strong> Categoría </strong></TD> <TD width="112"><strong> Comentario</strong></TD> <TD width="112"><strong> Imagen</strong></TD> </TR> <?php while($row = mysql_fetch_array($result)) { printf("<tr align='center'><td> %s</td><td> %s </td><td> %s </td><td> <img src='%s' border='0' width='100' height='100' /></td></tr>", $row["titulo"],$row["categoria"], $row["comentario"], $row["imagen"]); } mysql_free_result($result); mysql_close($link); ?> Alguien tiene alguna solucion?? Se lo agradeceria mucho |
Hola !! ¿Donde tú pones "DSC" no sería "DESC"? Saludos |
Ok tienes razon no me habia dado cuenta. Muchas gracias!!!!!! |
MySQL <> SQL Server Movido a MySQL |
| La zona horaria es GMT -6. Ahora son las 12:34. |
Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.