CONTROLLED ERROR

Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'product_ambiente.id_ambiente' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

/var/www/castelliporcelanato.com.br/public/Modules/Classes/Icecream/_Results.php 84

1 <?php
2
/**
3* Objeto de funções de resultados e queries
4*
5* @package    Icecream
6* @author     Lucas/Postali
7*/    
8    
namespace Icecream;
9
10    use \
PDO;
11    use \
Fault;
12
13    trait 
_Results
14    
{
15        private 
$_result;
16        private 
$_query;
17
18        
/**
19        * Verifica se há resultados prontos
20        *
21        * @return boolean
22        */
23        
public function hasResults ()
24        {
25            return 
is_null($this->_result) ? false true;
26        }
27
28        
/**
29        * Apaga os resultados anteriores
30        *
31        * @return null
32        */
33        
public function eraseResults ()
34        {
35            
$this->_result null;
36        }
37
38        private 
$_throwError false;
39
40        
/**
41         * Informa se o erro deve ser exibido de maneira simples, com um Fault (false), ou de maneira severa (true)
42         * 
43         * @param  boolean $condition Condição
44         * 
45         * @return Icecream
46         */
47        
public function throwError ($condition true)
48        {
49            if(
$condition === false || $condition === true)
50                
$this->_throwError $condition;
51
52            return 
$this;
53        }
54
55        
/**
56         * Informa se o erro deve ser exibido de maneira simples, com um Fault (false), ou de maneira severa (true) para todas as instâncias do Icecream
57         * 
58         * @param  boolean $condition Condição
59         * 
60         * @return null
61         */
62        
static public function alwaysThrowError ($condition true)
63        {
64            if(
$condition === false || $condition === true)
65                
$GLOBALS['icecream_throw_error'] = $condition;
66        }
67
68        
/**
69        * Cria um objeto de Fault de acordo com o erro do PDO
70        *
71        * @param object $object Objeto PDO
72        *
73        * @return object
74        */
75        
private function _parseError ($object)
76        {
77            
//Resgatar detalhes do erro
78            
$error $object->errorInfo();
79
80            
$description is_null($error[2]) ? 'Unknown error' $error[2];
81
82            
//Se permitido que o erro seja enviado
83            
if($this->_throwError)
84                Error($descriptionfalse);

85
86            
//Retornar um objeto Fault com detalhes do erro
87            
else
88                return new 
Fault($description$error[0], $this);
89
90        }
91
92        public 
$connection;
93
94        
/**
95        * Executa um comando do PDO
96        *
97        * @param string $queryString String da query
98        * @param boolean $bind Permite o vínculo de parâmetros
99        *
100        * @return mixed
101        */
102        
private function _exec ($queryString$bind true)
103        {
104            if(
self::isTraceEnabled())
105                
trace("Executing query"'Icecream', ['query' => $queryString'params' => $this->getParam() ]);
106
107            
//Abre a conexão
108            
try
109            {
110                
$this->connection $this->_pdoConnection();
111
112                
//Permitir que os valores retornem tipados (inteiros e floats)
113                
if(substr($queryString06) == "SELECT")
114                {
115                    
$this->connection->setAttribute(PDO::ATTR_STRINGIFY_FETCHESfalse);
116                    
$this->connection->setAttribute(PDO::ATTR_EMULATE_PREPARES false);
117                }
118            }
119            catch(
PDOException $e)
120            {
121                return 
$this->_parseError($this->connection);
122            }
123
124            
//Prepara a query
125            
try
126            {
127                
$query $this->connection->prepare($queryString);
128            }
129            catch(
PDOException $e)
130            {
131                return 
$this->_parseError($query);
132            }
133
134            
//Caso a query tenha algum erro, retornar erro
135            
if(!$query)
136                return 
$this->_parseError($this->connection);
137
138            
//Incluir valores
139            
if($bind === true)
140                
$this->_bindParam($query);
141
142            
//Executar query
143            
$result $query->execute();
144
145            
//Verificar se houve erros
146            
if(!$result)
147                return 
$this->_parseError($query);
148
149            return 
$query;
150        }
151    }

Error trace

You can see detailed error trace in the console.

System trace

You can see detailed error trace in the console.