Ver Mensaje Individual
  #6 (permalink)  
Antiguo 20/01/2015, 15:42
eslomao
 
Fecha de Ingreso: noviembre-2014
Mensajes: 60
Antigüedad: 9 años, 5 meses
Puntos: 0
Respuesta: obtener producto pro cada categoria

si claro

Estructura de tabla para la tabla `productos`
Código SQL:
Ver original
  1. --
  2.  
  3. CREATE TABLE IF NOT EXISTS `productos` (
  4.   `id` INT(11) NOT NULL AUTO_INCREMENT,
  5.   `nombre` text COLLATE utf8mb4_spanish_ci NOT NULL,
  6.   `descripcion` text COLLATE utf8mb4_spanish_ci NOT NULL,
  7.   `imagen` text COLLATE utf8mb4_spanish_ci NOT NULL,
  8.   `precio` DOUBLE NOT NULL,
  9.   PRIMARY KEY (`id`)
  10. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci AUTO_INCREMENT=7 ;
  11.  
  12. -----------------------------------------------------------------------------------------------------------
  13.  
  14. Estructura de tabla para la tabla `categoria`
  15. --
  16.  
  17. CREATE TABLE IF NOT EXISTS `categoria` (
  18.   `categoria` INT(11) NOT NULL AUTO_INCREMENT,
  19.   `descripcion` text COLLATE utf8mb4_spanish_ci NOT NULL,
  20.   `Producto` text COLLATE utf8mb4_spanish_ci NOT NULL,
  21.   `imagen` text COLLATE utf8mb4_spanish_ci NOT NULL,
  22.   PRIMARY KEY (`id`)
  23. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci AUTO_INCREMENT=7 ;
  24.  
  25. --
  26. -- Volcado de datos para la tabla `categoria`
  27. --
  28.  
  29.  
  30.  
  31. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  32. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  33. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Última edición por gnzsoloyo; 21/01/2015 a las 05:51