Ver Mensaje Individual
  #23 (permalink)  
Antiguo 21/12/2009, 16:20
Avatar de pato12
pato12
 
Fecha de Ingreso: septiembre-2007
Ubicación: Salta
Mensajes: 1.620
Antigüedad: 17 años, 5 meses
Puntos: 101
Respuesta: Relacionar 2 tablas

No entendi lo que es producto cartesiano xD
Esta son las tablas (estoy haciendo un foro, tipo phpbb):
Código SQL:
Ver original
  1. CREATE TABLE `half_foros` (
  2.   `id` INT(100) NOT NULL AUTO_INCREMENT,
  3.   `tema` INT(100) NOT NULL,
  4.   `name` VARCHAR(255) NOT NULL,
  5.   `detalle` VARCHAR(255) NOT NULL,
  6.   `posision` INT(10) NOT NULL,
  7.   `privado` INT(100) NOT NULL,
  8.   PRIMARY KEY  (`id`)
  9. ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  10.  
  11. CREATE TABLE `half_temas` (
  12.   `id` INT(100) NOT NULL AUTO_INCREMENT,
  13.   `title` VARCHAR(255) NOT NULL,
  14.   `autor` INT(100) NOT NULL,
  15.   `respuestas` INT(25) NOT NULL,
  16.   `visitas` INT(25) NOT NULL,
  17.   `utlautor` INT(100) NOT NULL,
  18.   `ulttime` INT(100) NOT NULL,
  19.   `foro` INT(10) NOT NULL,
  20.   `tema` INT(100) NOT NULL,
  21.   `contenido` text NOT NULL,
  22.   `time` INT(100) NOT NULL,
  23.   PRIMARY KEY  (`id`)
  24. ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
__________________
Half Music - www.halfmusic.com