Advertisement
Guest User

Untitled

a guest
Jul 26th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $db_host="localhost";
  2. $db_nombre="prueba";
  3. $db_user="root";
  4. $db_pass="";
  5.  
  6. $link=mysql_connect($db_host, $db_user, $db_pass);
  7.  
  8. $strQuery = "SELECT id, nombre FROM persona";
  9. $resultado = mysql_query ($strQuery);
  10.  
  11. while($arreglo = mysql_fetch_array ($resultado)) {
  12. echo $arreglo ["nombre"];
  13. }
  14.  
  15. //Resultado 1
  16. $arreglo = mysql_fetch_array ($resultado)
  17. echo $arreglo["nombre"];
  18. //Resultado 2
  19. $arreglo = mysql_fetch_array ($resultado)
  20. echo $arreglo["nombre"];
  21. //Resultado 3
  22. $arreglo = mysql_fetch_array ($resultado)
  23. echo $arreglo["nombre"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement