Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/03/2011, 20:53
Avatar de almagropaco_
almagropaco_
 
Fecha de Ingreso: marzo-2008
Ubicación: Mar del Plata
Mensajes: 854
Antigüedad: 16 años, 1 mes
Puntos: 25
Multiples consultas

Estoy haciendo muchas consultas, la verdad esta re desorganizado, pero me tira error y no se cual es, puede ser que sea uno simple porque me duele la cabeza y cais que no puedo pensar.. dejo el codigo:
Código PHP:
Ver original
  1. echo"<li><strong>Presidente</strong> ";
  2. $datos = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Presidente'");
  3. while($row = mysql_fetch_assoc($datos)) {
  4. echo'
  5. <a href="http://www.erepublik.com/en/citizen/profile/'. $row[perfil] .'" target="_blank">'. $row[user] .'</a>
  6. ';} echo" </li>";
  7.  
  8.  echo"<li><strong>Vicepresidente</strong> ";
  9. $datos1 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Vicepresidente'");
  10. while($row1 = mysql_fetch_assoc($datos1)) {
  11. echo'
  12. <a href="http://www.erepublik.com/en/citizen/profile/'. $row1[perfil] .'" target="_blank">'. $row1[user] .'</a>
  13. ';} echo" </li>";
  14.  
  15.  echo"<li><strong>Jefe de Gabinete</strong> ";
  16. $datos2 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Jefe de Gabinete'");
  17. while($row2 = mysql_fetch_assoc($datos2)) {
  18. echo'
  19. <a href="http://www.erepublik.com/en/citizen/profile/'. $row2[perfil] .'" target="_blank">'. $row2[user] .'</a>
  20. ';} echo" </li>";
  21.  
  22.  echo"<li><strong>Relaciones Exteriores</strong> ";
  23. $datos3 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Relaciones Exteriores'");
  24. while($row3 = mysql_fetch_assoc($datos3)) {
  25. echo'
  26. <a href="http://www.erepublik.com/en/citizen/profile/'. $row3[perfil] .'" target="_blank">'. $row3[user] .'</a>
  27. ';} echo" </li>";
  28.  
  29.  echo"<li><strong>Finanzas</strong> ";
  30. $datos4 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Finanzas'");
  31. while($row4 = mysql_fetch_assoc($datos4)) {
  32. echo'
  33. <a href="http://www.erepublik.com/en/citizen/profile/'. $row4[perfil] .'" target="_blank">'. $row4[user] .'</a>
  34. ';} echo" </li>";
  35.  
  36.  echo"<li><strong>Infraestructura</strong> ";
  37. $datos5 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Infraestructura'");
  38. while($row5 = mysql_fetch_assoc($datos5)) {
  39. echo'
  40. <a href="http://www.erepublik.com/en/citizen/profile/'. $row5[perfil] .'" target="_blank">'. $row5[user] .'</a>
  41. ';} echo" </li>";
  42.  
  43.  echo"<li><strong>Educación</strong> ";
  44. $datos6 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Educación'");
  45. while($row6 = mysql_fetch_assoc($datos6)) {
  46. echo'
  47. <a href="http://www.erepublik.com/en/citizen/profile/'. $row6[perfil] .'" target="_blank">'. $row6[user] .'</a>
  48. ';} echo" </li>";
  49.  
  50.  echo"<li><strong>Salud</strong> ";
  51. $datos7 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Salud'");
  52. while($row7 = mysql_fetch_assoc($datos7)) {
  53. echo'<a href="http://www.erepublik.com/en/citizen/profile/'. $row7[perfil] .'" target="_blank">'. $row7[user] .'</a>
  54. ';} echo" </li>";
  55.  
  56.  echo"<li><strong>Ocio</strong> ";
  57. $datos8 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Ocio'");
  58. while($row8 = mysql_fetch_assoc($datos8)) {
  59. echo'
  60. <a href="http://www.erepublik.com/en/citizen/profile/'. $row8[perfil] .'" target="_blank">'. $row8[user] .'</a>
  61. ';} echo" </li>";
  62.  
  63.  echo"<li><strong>Difusión</strong> ";
  64. $datos9 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Difusión'");
  65. while($row9 = mysql_fetch_assoc($datos9)) {
  66. echo'
  67. <a href="http://www.erepublik.com/en/citizen/profile/'. $row9[perfil] .'" target="_blank">'. $row9[user] .'</a>
  68. ';} echo" </li>";
  69.  
  70.  echo"<li><strong>Babyboom</strong> ";
  71. $datos10 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Babyboom'");
  72. while($row10 = mysql_fetch_assoc($datos10)) {
  73. echo'
  74. <a href="http://www.erepublik.com/en/citizen/profile/'. $row10[perfil] .'" target="_blank">'. $row10[user] .'</a>
  75. ';} echo" </li>";
  76.  
  77.  echo"<li><strong>Secretaría de estadisticas y censos</strong> ";
  78. $datos11 = mysql_query("SELECT * from datos ORDER BY id WHERE cargo = 'Secretaría de estadisticas y censos'");
  79. while($row11 = mysql_fetch_assoc($datos11)) {
  80. echo'
  81. <a href="http://www.erepublik.com/en/citizen/profile/'. $row11[perfil] .'" target="_blank">'. $row11[user] .'</a>
  82. ';} echo" </li>";