
13/09/2011, 08:40
|
 | | | Fecha de Ingreso: agosto-2011 Ubicación: Cádiz
Mensajes: 27
Antigüedad: 13 años, 6 meses Puntos: 8 | |
Respuesta: Mensajeria en PHP Pensaba que era un sistema de mensajería donde los msg se los envían los usuarios entre ellos y no un foro.
Para un foro hice uno de prácticas cuando empezaba y a ver si te vale esta estructura:
Código:
--
-- Estructura de tabla para la tabla `forohilo`
--
CREATE TABLE `forohilo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`forotema_id` int(11) DEFAULT NULL,
`usuarios_id` int(11) DEFAULT NULL,
`fecha_at` datetime DEFAULT NULL,
`texto` text,
`usuario` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ;
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `foroseccion`
--
CREATE TABLE `foroseccion` (
`id` int(11) NOT NULL,
`nombre` varchar(300) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
);
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `forotema`
--
CREATE TABLE `forotema` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`usuarios_id` int(11) DEFAULT NULL,
`foroseccion_id` int(11) DEFAULT NULL,
`asunto` varchar(150) DEFAULT NULL,
`texto` text,
`fecha_at` datetime DEFAULT NULL,
`usuario` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
);
Son 3 tablas: - foro_seccion: para dividir el foro en diferentes secciones
- foro_hilo: son los hijos de un tema
- foro_tema: cada tema que se habre nuevo
|