Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/12/2011, 12:49
kevinvgp
(Desactivado)
 
Fecha de Ingreso: septiembre-2011
Ubicación: Casupá, Florida, Uruguay
Mensajes: 70
Antigüedad: 12 años, 7 meses
Puntos: 4
Respuesta: duda con una consulta simple a MySQL

ups, no entiendo como usar el intval($fila["num1"])
me da error:

Código PHP:
Ver original
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <center>
  6. <?php
  7. $conexion = mysql_connect("localhost","root", "");
  8. mysql_select_db("prueba", $conexion);
  9.  
  10. $registros = mysql_query("select * from numeritos", $conexion);
  11. echo "<br><hr>";
  12. echo intval($fila["num1"]) + intval($fila["num2"]);
  13. ?>
  14. </center>
  15. </body>
  16. </html>