Tema: Registros
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 11/09/2007, 05:29
Avatar de Phoenix23
Phoenix23
 
Fecha de Ingreso: agosto-2007
Ubicación: 43.286211, -2.171349
Mensajes: 253
Antigüedad: 16 años, 8 meses
Puntos: 1
Re: Registros

Hola,

Los inserto con el insert into y luego hago un select * de la tabla.

Este es el insert:

$insertSQL = sprintf("INSERT INTO Lambide (IdLanbide, Titulo, FechaFin, Cento, IdSocial) VALUES (%s, %s, %s, %s, %s)",
GetSQLValueString($_POST['IdLambide'], "int"),
GetSQLValueString($_POST['Titulo'], "text"),
GetSQLValueString($_POST['FechaFin'], "date"),
GetSQLValueString($_POST['Centro'], "text"),
GetSQLValueString($_POST['IdSocial'], "int"));

mysql_select_db($database_Trabajo, $Trbajo);
$Result1 = mysql_query($insertSQL, $Trabajo) or die(mysql_error());

y la tabla es asi:

----------------------------------------------------------------------
IdLambide | Titulo | FechaFin | Centro | IdSocia l
----------------------------------------------------------------------
| | | | |
-----------------------------------------------------------------------
| | | | |
-----------------------------------------------------------------------
| | | | |
-----------------------------------------------------------------------

Y luego voy al mySql y le hago un SELECT * FROM trabajo y solo me guarda el ultimo registro.

Gracias y saludos!!!!