Ver Mensaje Individual
  #8 (permalink)  
Antiguo 17/12/2007, 10:35
Avatar de JrPHP
JrPHP
 
Fecha de Ingreso: diciembre-2007
Mensajes: 24
Antigüedad: 16 años, 4 meses
Puntos: 0
Re: Relacionar dos tablas en mysql

No había mirado FAQ's de MySQL...

Ahora me da otro error:
Código:
CREATE TABLE `sesiones` (

`IDSESION` int( 11 ) NOT NULL AUTO_INCREMENT ,
`INICIO` datetime NOT NULL ,
`FINAL` datetime default NULL ,
`USERNOMBRE` char( 50 ) NOT NULL ,
`IPORIGEN` char( 15 ) NOT NULL ,
PRIMARY KEY ( `IDSESION` ) ,
KEY `FK_sesiones_USERS` ( `USERNOMBRE` ) ,
CONSTRAINT `FK_sesiones_USERS` FOREIGN KEY ( `USERNOMBRE` ) REFERENCES `usuariosbase` ( `USERNOMBRE` ) 
) ENGINE = InnoDB DEFAULT CHARSET = latin1;


MySQL ha dicho:  

#1005 - Can't create table '.\ejemplo\sesiones.frm' (errno: 150)