[Php-avanzado] Leo: A ver que te parece esto...

Silverzero silverzero.52 en gmail.com
Vie Nov 13 01:35:18 ARST 2009


ok, porque presentía la posibilidad de que podría mamarrachear, no borré las
tablas anteriores, asi que lo dejo como antes, y ya que estamos para seguir
con la linea dejo las tablas de votos tradicionales, asi no me hago lío y
listo...y agregué la tabla "publico" (id, publico) para poner 2 registros:
adulto, niño y le agregue un campo refiriendo a esto a cada tabla de evento,
actividad y lugar.

Muchas gracias nuevamente, y disculpame por favor Leo que tengas que revisar
todo a cada rato...acá van:


-- phpMyAdmin SQL Dump
-- version 2.11.9.5
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 13-11-2009 a las 01:32:26
-- Versión del servidor: 5.0.81
-- Versión de PHP: 5.2.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Base de datos: `salimas_sitio`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `actividades`
--

CREATE TABLE IF NOT EXISTS `actividades` (
  `id` int(11) NOT NULL auto_increment,
  `fecha` date NOT NULL,
  `desde` date NOT NULL,
  `hasta` date NOT NULL,
  `horario` varchar(50) collate utf8_unicode_ci NOT NULL,
  `titulo` varchar(50) collate utf8_unicode_ci NOT NULL,
  `descripcion` text collate utf8_unicode_ci NOT NULL,
  `imagen` varchar(50) collate utf8_unicode_ci NOT NULL,
  `url` varchar(50) collate utf8_unicode_ci NOT NULL,
  `precio` varchar(50) collate utf8_unicode_ci NOT NULL,
  `id_visitante` int(11) NOT NULL,
  `id_lugar` int(11) NOT NULL,
  `id_stat` int(2) NOT NULL,
  `id_publico` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=2 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `actividadesXcat`
--

CREATE TABLE IF NOT EXISTS `actividadesXcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_act` int(11) NOT NULL,
  `id_cat` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `actividadesXsubcat`
--

CREATE TABLE IF NOT EXISTS `actividadesXsubcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_act` int(11) NOT NULL,
  `id_subcat` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `actividades_cat`
--

CREATE TABLE IF NOT EXISTS `actividades_cat` (
  `id` int(11) NOT NULL auto_increment,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `actividades_subcat`
--

CREATE TABLE IF NOT EXISTS `actividades_subcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_actividad_cat` int(11) NOT NULL,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `diccionario`
--

CREATE TABLE IF NOT EXISTS `diccionario` (
  `id` int(11) NOT NULL auto_increment,
  `frase` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=38 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `eventos`
--

CREATE TABLE IF NOT EXISTS `eventos` (
  `id` int(11) NOT NULL auto_increment,
  `fecha` date NOT NULL,
  `desde` date NOT NULL,
  `hasta` date NOT NULL,
  `horario` varchar(50) collate utf8_unicode_ci NOT NULL,
  `titulo` varchar(50) collate utf8_unicode_ci NOT NULL,
  `descripcion` text collate utf8_unicode_ci NOT NULL,
  `imagen` varchar(50) collate utf8_unicode_ci NOT NULL,
  `url` varchar(100) collate utf8_unicode_ci NOT NULL,
  `precio` varchar(50) collate utf8_unicode_ci NOT NULL,
  `id_visitante` int(11) NOT NULL,
  `id_lugar` int(11) NOT NULL,
  `id_stat` int(2) NOT NULL,
  `id_publico` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=4 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `eventosXcat`
--

CREATE TABLE IF NOT EXISTS `eventosXcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_eve` int(11) NOT NULL,
  `id_cat` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `eventosXsubcat`
--

CREATE TABLE IF NOT EXISTS `eventosXsubcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_eve` int(11) NOT NULL,
  `id_subcat` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `eventos_cat`
--

CREATE TABLE IF NOT EXISTS `eventos_cat` (
  `id` int(11) NOT NULL auto_increment,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `eventos_subcat`
--

CREATE TABLE IF NOT EXISTS `eventos_subcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_evento_cat` int(11) NOT NULL,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `localidades`
--

CREATE TABLE IF NOT EXISTS `localidades` (
  `cod_loc` int(4) NOT NULL auto_increment,
  `cod_prov` int(2) NOT NULL,
  `desc` varchar(31) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`cod_loc`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=2383 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `lugares`
--

CREATE TABLE IF NOT EXISTS `lugares` (
  `id` int(11) NOT NULL auto_increment,
  `fecha` date NOT NULL,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  `direccion` varchar(50) collate utf8_unicode_ci NOT NULL,
  `telefono` varchar(50) collate utf8_unicode_ci NOT NULL,
  `email` varchar(50) collate utf8_unicode_ci NOT NULL,
  `horario` varchar(50) collate utf8_unicode_ci NOT NULL,
  `precio` varchar(50) collate utf8_unicode_ci NOT NULL,
  `descripcion` text collate utf8_unicode_ci NOT NULL,
  `imagen` varchar(50) collate utf8_unicode_ci NOT NULL,
  `url` varchar(50) collate utf8_unicode_ci NOT NULL,
  `id_visitante` int(11) NOT NULL,
  `cod_loc` int(4) NOT NULL,
  `id_stat` int(2) NOT NULL,
  `id_publico` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=11 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `lugaresXcat`
--

CREATE TABLE IF NOT EXISTS `lugaresXcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_lug` int(11) NOT NULL,
  `id_cat` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `lugaresXsubcat`
--

CREATE TABLE IF NOT EXISTS `lugaresXsubcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_lug` int(11) NOT NULL,
  `id_subcat` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `lugares_cat`
--

CREATE TABLE IF NOT EXISTS `lugares_cat` (
  `id` int(11) NOT NULL auto_increment,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `lugares_subcat`
--

CREATE TABLE IF NOT EXISTS `lugares_subcat` (
  `id` int(11) NOT NULL auto_increment,
  `id_lugar_cat` int(11) NOT NULL,
  `nombre` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `provincias`
--

CREATE TABLE IF NOT EXISTS `provincias` (
  `cod_prov` int(2) NOT NULL,
  `desc` varchar(30) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`cod_prov`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `publico`
--

CREATE TABLE IF NOT EXISTS `publico` (
  `id` int(11) NOT NULL auto_increment,
  `publico` varchar(50) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `status`
--

CREATE TABLE IF NOT EXISTS `status` (
  `id` int(11) NOT NULL,
  `stat` varchar(10) collate utf8_unicode_ci NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `visitantes`
--

CREATE TABLE IF NOT EXISTS `visitantes` (
  `id` int(11) NOT NULL auto_increment,
  `fecha` date NOT NULL,
  `nombres` varchar(50) collate utf8_unicode_ci NOT NULL,
  `apellidos` varchar(50) collate utf8_unicode_ci NOT NULL,
  `alias` varchar(50) collate utf8_unicode_ci NOT NULL,
  `email` varchar(50) collate utf8_unicode_ci NOT NULL,
  `pass` varchar(50) collate utf8_unicode_ci NOT NULL,
  `avatar` varchar(50) collate utf8_unicode_ci NOT NULL,
  `ocupacion` varchar(50) collate utf8_unicode_ci NOT NULL,
  `about` text collate utf8_unicode_ci NOT NULL,
  `intereses` text collate utf8_unicode_ci NOT NULL,
  `url` varchar(50) collate utf8_unicode_ci NOT NULL,
  `id_stat` int(2) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=3 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `votos_actividades`
--

CREATE TABLE IF NOT EXISTS `votos_actividades` (
  `id` int(11) NOT NULL auto_increment,
  `voto` int(11) NOT NULL,
  `puntaje` int(11) NOT NULL,
  `id_ref` int(11) NOT NULL,
  `id_tipo` int(11) NOT NULL,
  `id_visitante` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `votos_eventos`
--

CREATE TABLE IF NOT EXISTS `votos_eventos` (
  `id` int(11) NOT NULL auto_increment,
  `voto` int(11) NOT NULL,
  `puntaje` int(11) NOT NULL,
  `id_ref` int(11) NOT NULL,
  `id_tipo` int(11) NOT NULL,
  `id_visitante` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `votos_lugares`
--

CREATE TABLE IF NOT EXISTS `votos_lugares` (
  `id` int(11) NOT NULL auto_increment,
  `voto` int(11) NOT NULL,
  `puntaje` int(11) NOT NULL,
  `id_ref` int(11) NOT NULL,
  `id_tipo` int(11) NOT NULL,
  `id_visitante` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
AUTO_INCREMENT=1 ;

Saludos!
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://www3.fi.mdp.edu.ar/cgi-bin/mailman/private/php-avanzado/attachments/20091113/7f9cc08b/attachment.htm 


Más información sobre la lista de distribución Php-avanzado