-- phpMyAdmin SQL Dump
-- version 4.9.0.1deb1
-- https://www.phpmyadmin.net/
--
-- Servidor: mariadb-027.wc1:3306
-- Tiempo de generación: 20-10-2021 a las 13:07:11
-- Versión del servidor: 10.1.41-MariaDB-0+deb10u2
-- Versión de PHP: 7.3.27-1~deb10u1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `658938_newsitelemen`
--

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

--
-- Estructura Stand-in para la vista `HomeCategoriesArticles`
-- (Véase abajo para la vista actual)
--
CREATE TABLE `HomeCategoriesArticles` (
`id` int(11)
,`section` varchar(100)
,`group` varchar(100)
,`gtitle` varchar(255)
,`category` varchar(100)
,`brand` varchar(100)
,`btitle` varchar(255)
,`house` varchar(100)
,`htitle` varchar(255)
,`supplier` varchar(100)
,`suptitle` varchar(255)
,`display` varchar(100)
,`distitle` varchar(255)
,`fragance` varchar(100)
,`color` varchar(100)
,`size` varchar(100)
,`percentage` varchar(100)
,`unit` varchar(100)
,`unititle` varchar(255)
,`code_qr` varchar(255)
,`categorytitle` varchar(255)
,`description` varchar(255)
,`description_extended` text
,`code` varchar(255)
,`price` varchar(255)
,`price_two` varchar(255)
,`equivalent` varchar(255)
,`photo` varchar(255)
,`file` varchar(255)
,`offer` int(1)
,`tax` int(1)
,`featured` int(1)
,`salient` int(1)
,`discount` int(11)
,`discount_type` int(1)
);

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

--
-- Estructura para la vista `HomeCategoriesArticles`
--
DROP TABLE IF EXISTS `HomeCategoriesArticles`;

CREATE ALGORITHM=UNDEFINED DEFINER=`658938_newsite`@`%` SQL SECURITY DEFINER VIEW `HomeCategoriesArticles`  AS  select `articles`.`id` AS `id`,`articles`.`section` AS `section`,`articles`.`group` AS `group`,`groups`.`title` AS `gtitle`,`articles`.`category` AS `category`,`articles`.`brand` AS `brand`,`brands`.`title` AS `btitle`,`articles`.`house` AS `house`,`houses`.`title` AS `htitle`,`articles`.`supplier` AS `supplier`,`suppliers`.`title` AS `suptitle`,`articles`.`display` AS `display`,`displays`.`title` AS `distitle`,`articles`.`fragance` AS `fragance`,`articles`.`color` AS `color`,`articles`.`size` AS `size`,`articles`.`percentage` AS `percentage`,`articles`.`unit` AS `unit`,`units`.`title` AS `unititle`,`articles`.`code_qr` AS `code_qr`,`categories`.`title` AS `categorytitle`,`articles`.`description` AS `description`,`articles`.`description_extended` AS `description_extended`,`articles`.`code` AS `code`,`articles`.`price` AS `price`,`articles`.`price_two` AS `price_two`,`articles`.`equivalent` AS `equivalent`,`articles`.`photo` AS `photo`,`articles`.`file` AS `file`,`articles`.`offer` AS `offer`,`articles`.`tax` AS `tax`,`articles`.`featured` AS `featured`,`articles`.`salient` AS `salient`,`articles`.`discount` AS `discount`,`articles`.`discount_type` AS `discount_type` from (((((((`articles` join `categories` on((`articles`.`category` = `categories`.`code`))) left join `groups` on((`articles`.`group` = `groups`.`code`))) left join `brands` on((`articles`.`brand` = `brands`.`code`))) left join `houses` on((`articles`.`house` = `houses`.`code`))) left join `suppliers` on((`articles`.`supplier` = `suppliers`.`code`))) left join `units` on((`articles`.`unit` = `units`.`code`))) left join `displays` on((`articles`.`display` = `displays`.`code`))) where (`articles`.`enabled` = 1) group by `articles`.`id` ;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
