Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/02/2011, 06:53
Avatar de ale_dla
ale_dla
 
Fecha de Ingreso: abril-2009
Ubicación: Buenos Aires, Argentina
Mensajes: 189
Antigüedad: 15 años
Puntos: 3
Consulta para foro

Hola a todos!
Estoy desarrollando un foro en el cual tengo una consulta.
Tengo una tabla topics donde estan los datos de los temas con el id,titulo,el usuario que lo creo,fecha.
Esta es la tabla topics:
Código PHP:

CREATE TABLE 
IF NOT EXISTS `topics` (
  `
topic_idint(8NOT NULL auto_increment,
  `
topic_subjectvarchar(255NOT NULL,
  `
topic_dateDATETIME,
  `
topic_catint(8NOT NULL,
  `
topic_byint(8NOT NULL,
  
PRIMARY KEY  (`topic_id`),
  
KEY `topic_cat` (`topic_cat`),
  
KEY `topic_by` (`topic_by`)
ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=
Tengo otra tabla llamada post donde esta el id ,el titulo,el contenido del mensaje,el id del tema, y el id del usuario.
Código PHP:

CREATE TABLE 
IF NOT EXISTS `posts` (
  `
post_idint(8NOT NULL auto_increment,
  `
post_contenttext NOT NULL,
  `
post_datedatetime NOT NULL,
  `
post_topicint(8NOT NULL,
  `
post_byint(8NOT NULL,
  
PRIMARY KEY  (`post_id`),
  
KEY `post_topic` (`post_topic`)
ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 
Ahora mi consulta es sirve que cuando un usuario responda guarde tambien el la tabla post? O es mejor crear una nueva tabla?
Quien pueda responder se los agradezco!
Saludos!