- FICHEIRO: /home/spzn/library/Zend/Db/Statement/Pdo.php
- LINHA: 235
- MENSAGEM: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in field list is ambiguous, query was: SELECT COUNT(DISTINCT `id`,`id`,`produto_id`,`categoria_id`,`actualizado`,`criado`,`ip`,`id`,`pai_id`,`ficha_id`,`iva_id`,`ordem`,`titulo`,`url`,`imagem`,`activo`,`actualizado`,`criado`,`ip`) AS `zend_paginator_row_count` FROM `catalogo_produto_pt`
LEFT JOIN `catalogo_ficha_pt` ON catalogo_produto_pt.ficha_id=catalogo_ficha_pt.id
LEFT JOIN `catalogo_iva` ON catalogo_produto_pt.iva_id=catalogo_iva.id
INNER JOIN `catalogo_produto_categoria` ON catalogo_produto_pt.id=catalogo_produto_categoria.produto_id
INNER JOIN `catalogo_categoria_pt` ON catalogo_categoria_pt.id=catalogo_produto_categoria.categoria_id WHERE (catalogo_produto_categoria.categoria_id = 1) OR (catalogo_produto_categoria.categoria_id = '3') OR (catalogo_produto_categoria.categoria_id = '4') OR (catalogo_produto_categoria.categoria_id = '5') AND (catalogo_produto_pt.activo = 1)
- 231. }
- 232. } catch (PDOException $e) {
- 233. require_once 'Zend/Db/Statement/Exception.php';
- 234. $message = sprintf('%s, query was: %s', $e->getMessage(), $this->_stmt->queryString);
- 235. throw new Zend_Db_Statement_Exception($message, (int) $e->getCode(), $e);
- 236. }
- 237. }
- 238.
- 239. /**
- 240. * Fetches a row from the result set.
- FICHEIRO: /home/spzn/library/Zend/Db/Statement.php
- LINHA: 303
- 299. /*
- 300. * Simple case - no query profiler to manage.
- 301. */
- 302. if ($this->_queryId === null) {
- 303. return $this->_execute($params);
- 304. }
- 305.
- 306. /*
- 307. * Do the same thing, but with query profiler
- 308. * management before and after the execute.
- FICHEIRO: /home/spzn/library/Zend/Db/Adapter/Abstract.php
- LINHA: 480
- 476. }
- 477.
- 478. // prepare and execute the statement with profiling
- 479. $stmt = $this->prepare($sql);
- 480. $stmt->execute($bind);
- 481.
- 482. // return the results embedded in the prepared statement object
- 483. $stmt->setFetchMode($this->_fetchMode);
- 484. return $stmt;
- 485. }
- FICHEIRO: /home/spzn/library/Zend/Db/Adapter/Pdo/Abstract.php
- LINHA: 238
- 234. }
- 235. }
- 236.
- 237. try {
- 238. return parent::query($sql, $bind);
- 239. } catch (PDOException $e) {
- 240. /**
- 241. * @see Zend_Db_Statement_Exception
- 242. */
- 243. require_once 'Zend/Db/Statement/Exception.php';
- FICHEIRO: /home/spzn/library/Zend/Db/Adapter/Abstract.php
- LINHA: 828
- 824. * @return string
- 825. */
- 826. public function fetchOne($sql, $bind = array())
- 827. {
- 828. $stmt = $this->query($sql, $bind);
- 829. $result = $stmt->fetchColumn(0);
- 830. return $result;
- 831. }
- 832.
- 833. /**
- FICHEIRO: /home/spzn/library/Goweb/Db/Model.php
- LINHA: 745
- 741. $rowCount->columns($expression);
- 742. if ($this->_useCache){
- 743. $cache = Zend_Registry::get('cache');
- 744. if(($result = $cache->load($this->_table . '_' . md5($rowCount->__toString()))) === false) {
- 745. $result = $this->_db->fetchOne($rowCount);
- 746. $cache->save($result, $this->_table . '_' . md5($rowCount->__toString()), array($this->_table));
- 747. }
- 748. } else {
- 749. $result = $this->_db->fetchOne($rowCount);
- 750. }
- FICHEIRO: /home/spzn/application/Catalogo/Controller.php
- LINHA: 199
- 195. }
- 196.
- 197. $this->_produtoModel->where($this->_produtoModel->getTableName() . '.activo = ?', 1);
- 198.
- 199. $numProdutos = $this->_produtoModel->count('id');
- 200. $select = $this->_produtoModel->getSelect();
- 201. $paginator = new Goweb_Paginator(Goweb::link($link, 'page='),
- 202. $numProdutos,
- 203. $page,
- 204. $rows);
- FICHEIRO: /home/spzn/library/Goweb/Controller/Action.php
- LINHA: 276
- 272. */
- 273. /*if ($this->getInvokeArg('useCaseSensitiveActions')) {
- 274. trigger_error('Using case sensitive actions without word separators is deprecated; please do not rely on this "feature"');
- 275. }*/
- 276. $this->$action();
- 277. } else {
- 278. $this->__call($action, array());
- 279. }
- 280. $this->postDispatch();
- 281. }
- FICHEIRO: /home/spzn/library/Zend/Controller/Dispatcher/Standard.php
- LINHA: 308
- 304. ob_start();
- 305. }
- 306.
- 307. try {
- 308. $controller->dispatch($action);
- 309. } catch (Exception $e) {
- 310. // Clean output buffer on error
- 311. $curObLevel = ob_get_level();
- 312. if ($curObLevel > $obLevel) {
- 313. do {
- FICHEIRO: /home/spzn/library/Zend/Controller/Front.php
- LINHA: 954
- 950. /**
- 951. * Dispatch request
- 952. */
- 953. try {
- 954. $dispatcher->dispatch($this->_request, $this->_response);
- 955. } catch (Exception $e) {
- 956. if ($this->throwExceptions()) {
- 957. throw $e;
- 958. }
- 959. $this->_response->setException($e);
- FICHEIRO: /home/spzn/library/Goweb/Application.php
- LINHA: 449
- 445. }
- 446.
- 447. public function runApp(){
- 448. $frontController = Zend_Controller_Front::getInstance();
- 449. $frontController->dispatch();
- 450. }
- 451. }
- FICHEIRO: /home/spzn/public_html/index.php
- LINHA: 54
- 50. $application->initPainel();
- 51. $lang = isset($_GET['lang']) ? $_GET['lang'] : null;
- 52. $application->initLanguage($lang, true, false);
- 53. $application->initLanguageAdmin($lang, true, true);
- 54. $application->runApp();
- 55.
- 56.
- 57. /**
- 58. * Efectua a traducao de uma string.
- 59. */