<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

ERROR - 2021-03-21 10:45:23 --> Query error: Access denied for user 'epiz_27978812'@'192.168.%' to database 'epiz_27978812_acmapos' - Invalid query: CREATE TEMPORARY TABLE IF NOT EXISTS total_produtos SELECT SUM(subTotal) as total_produto, os_id FROM produtos_os GROUP BY os_id; 
ERROR - 2021-03-21 10:45:23 --> Query error: Access denied for user 'epiz_27978812'@'192.168.%' to database 'epiz_27978812_acmapos' - Invalid query: CREATE TEMPORARY TABLE IF NOT EXISTS total_servicos SELECT SUM(subTotal) as total_servico, os_id FROM servicos_os GROUP BY os_id; 
ERROR - 2021-03-21 10:45:23 --> Query error: Table 'epiz_27978812_acmapos.total_produtos' doesn't exist - Invalid query: SELECT `os`.*, `clientes`.`nomeCliente`, `total_servicos`.`total_servico`, `total_produtos`.`total_produto`
FROM `os`
JOIN `clientes` ON `clientes`.`idClientes` = `os`.`clientes_id`
LEFT JOIN `total_produtos` ON `total_produtos`.`os_id` = `os`.`idOs`
LEFT JOIN `total_servicos` ON `total_servicos`.`os_id` = `os`.`idOs`
ORDER BY `os`.`dataInicial` DESC
ERROR - 2021-03-21 15:35:33 --> Query error: Access denied for user 'epiz_27978812'@'192.168.%' to database 'epiz_27978812_acmapos' - Invalid query: CREATE TEMPORARY TABLE IF NOT EXISTS total_produtos SELECT SUM(subTotal) as total_produto, os_id FROM produtos_os GROUP BY os_id; 
ERROR - 2021-03-21 15:35:33 --> Query error: Access denied for user 'epiz_27978812'@'192.168.%' to database 'epiz_27978812_acmapos' - Invalid query: CREATE TEMPORARY TABLE IF NOT EXISTS total_servicos SELECT SUM(subTotal) as total_servico, os_id FROM servicos_os GROUP BY os_id; 
ERROR - 2021-03-21 15:35:33 --> Query error: Table 'epiz_27978812_acmapos.total_produtos' doesn't exist - Invalid query: SELECT `os`.*, `clientes`.`nomeCliente`, `total_servicos`.`total_servico`, `total_produtos`.`total_produto`
FROM `os`
JOIN `clientes` ON `clientes`.`idClientes` = `os`.`clientes_id`
LEFT JOIN `total_produtos` ON `total_produtos`.`os_id` = `os`.`idOs`
LEFT JOIN `total_servicos` ON `total_servicos`.`os_id` = `os`.`idOs`
ORDER BY `os`.`dataInicial` DESC
