I have the following code where I need to save $ error_itens the complete query with the parameters to analyze what is happening, my question is, how do I show this query?
$sql = new Sql($this->adapter);
$query = $sql->insert('reg_c170');
$query->values($prod);
$erro_itens = $queryAqui; // preciso ver a query
$myitens = fopen("./data/log/".date('Y-m-d')."-itens-add.log", "a+");
fwrite($myitens, $erro_itens."\r\n");
fclose($myitens);