A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: models/Produtos_model.php

Line Number: 268

Backtrace:

File: /home/rtorolamentos/public_html/application/models/Produtos_model.php
Line: 268
Function: _error_handler

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 142
Function: mostra_produto

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'grade' of non-object

Filename: models/Produtos_model.php

Line Number: 268

Backtrace:

File: /home/rtorolamentos/public_html/application/models/Produtos_model.php
Line: 268
Function: _error_handler

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 142
Function: mostra_produto

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: models/Produtos_model.php

Line Number: 278

Backtrace:

File: /home/rtorolamentos/public_html/application/models/Produtos_model.php
Line: 278
Function: _error_handler

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 142
Function: mostra_produto

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'grade' of non-object

Filename: models/Produtos_model.php

Line Number: 278

Backtrace:

File: /home/rtorolamentos/public_html/application/models/Produtos_model.php
Line: 278
Function: _error_handler

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 142
Function: mostra_produto

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/Carrinho.php

Line Number: 155

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 155
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'desconto' of non-object

Filename: controllers/Carrinho.php

Line Number: 155

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 155
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/Carrinho.php

Line Number: 163

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 163
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'preco' of non-object

Filename: controllers/Carrinho.php

Line Number: 163

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 163
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/Carrinho.php

Line Number: 168

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 168
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'grade' of non-object

Filename: controllers/Carrinho.php

Line Number: 168

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 168
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/Carrinho.php

Line Number: 179

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 179
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to get property 'grade' of non-object

Filename: controllers/Carrinho.php

Line Number: 179

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 179
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Undefined index: id_produtos_opcoes2

Filename: controllers/Carrinho.php

Line Number: 198

Backtrace:

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 198
Function: _error_handler

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/rtorolamentos/public_html/system/core/Exceptions.php:271)

Filename: core/Common.php

Line Number: 564

Backtrace:

File: /home/rtorolamentos/public_html/application/models/Produtos_model.php
Line: 465
Function: query

File: /home/rtorolamentos/public_html/application/controllers/Carrinho.php
Line: 198
Function: estoque_opcao2

File: /home/rtorolamentos/public_html/index.php
Line: 315
Function: require_once

Database Error

A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY `valor1`,`valor2`' at line 31

SELECT `po1`.`id_produtos_opcoes` AS `id_produtos_opcoes`, `po2`.`id_produtos_opcoes` AS `id_produtos_opcoes2`, `p`.`id_produto` AS `id_produto`, `p`.`nome` AS `nome`, `o1`.`opcao` AS `opcao1`, `po1`.`valor` AS `valor1`, `o2`.`opcao` AS `opcao2`, `po2`.`valor` AS `valor2`, (CASE WHEN (`p`.`grade` = 'PRODUTO') THEN `p`.`estoque` WHEN (`p`.`grade` = 'GRADE1') THEN (SELECT `sub_po2`.`preco_adicional` FROM `produtos_opcoes` `sub_po2` WHERE (`sub_po2`.`id_produtos_opcoes` = `po1`.`id_produtos_opcoes`)) WHEN (`p`.`grade` = 'GRADE2') THEN (SELECT `sub_po3`.`preco_adicional` FROM `produtos_opcoes` `sub_po3` WHERE (`sub_po3`.`id_produtos_opcoes` = `po2`.`id_produtos_opcoes`)) ELSE 0 END) AS `preco_adicional`, (CASE WHEN (`p`.`grade` = 'PRODUTO') THEN `p`.`estoque` WHEN (`p`.`grade` = 'GRADE1') THEN (SELECT `sub_po2`.`estoque` FROM `produtos_opcoes` `sub_po2` WHERE (`sub_po2`.`id_produtos_opcoes` = `po1`.`id_produtos_opcoes`)) WHEN (`p`.`grade` = 'GRADE2') THEN (SELECT `sub_po3`.`estoque` FROM `produtos_opcoes` `sub_po3` WHERE (`sub_po3`.`id_produtos_opcoes` = `po2`.`id_produtos_opcoes`)) ELSE 0 END) AS `estoque` FROM ((((`produtos` `p` LEFT JOIN `produtos_opcoes` `po1` ON (((`p`.`id_produto` = `po1`.`id_produto`) AND ISNULL(`po1`.`id_opcao2`)))) LEFT JOIN `produtos_opcoes` `po2` ON (((`po1`.`id_produtos_opcoes` = `po2`.`id_opcao2`) AND (`po2`.`id_opcao2` IS NOT NULL)))) LEFT JOIN `opcoes` `o1` ON ((`o1`.`id_opcao` = `po1`.`id_opcao`))) LEFT JOIN `opcoes` `o2` ON ((`o2`.`id_opcao` = `po2`.`id_opcao`))) where po2.id_produtos_opcoes= ORDER BY `valor1`,`valor2`

Filename: models/Produtos_model.php

Line Number: 465