if ($orden_cambio == 1) { if (!$order_tipo) { $order_tipo = "desc"; } else { $order_tipo = ""; } } $isql = 'select b.RADI_NUME_RADI "IMG_Numero Radicado" ,b.RADI_PATH "HID_RADI_PATH" ,b.RADI_NUME_DERI "Radicado Padre" ,b.RADI_FECH_RADI "HOR_RAD_FECH_RADI" ,' . $sqlFecha . ' "Fecha Radicado" ,b.RA_ASUN "Descripcion" ,a.ANEX_CREADOR "Generado Por" ,c.SGD_TPR_DESCRIP ,a.RADI_NUME_SALIDA "CHK_CHKANULAR" from anexos a,radicado b,SGD_TPR_TPDCUMENTO c where b.radi_nume_radi is not null and a.anex_radi_nume is not null and b.radi_nume_radi=a.anex_radi_nume and b.tdoc_codi=c.sgd_tpr_codigo order by ' . $order . ' ' . $order_tipo; $db->debug = true; $pager = new ADODB_Pager($db, $isql, 'adodb', true, $order_no, $order_tipo); $to_ref_order = "paginador.php?order_tipo={$order_tipo}&order_no="; $pager->Render($rows_per_page = 35, $to_ref_order, $checkbox = chkAnulados); $e = ADODB_Pear_Error(); echo '<p>', $e->message, '</p>';
/** * Private method that will ADOConnection::prepare() & ADOConnection::execute() * to retrieve records. * * @param mixed $sql An array with an element at the index 'query'. * @param string $configPath The config path used for exception messages. * * @return DB_result * @throws XML_Query2XML_DBException If a database related error occures. */ private function _prepareAndExecute($sql, $configPath) { $query =& $sql['query']; if (isset($this->_preparedQueries[$query])) { $queryHandle = $this->_preparedQueries[$query]; } else { // ADOdb centralizes all error-handling in execute() $queryHandle = $this->_db->prepare($query); $this->_preparedQueries[$query] =& $queryHandle; } /* * EXECUTE */ try { if (isset($sql['data'])) { $result = $this->_db->execute($queryHandle, $sql['data']); } else { $result = $this->_db->execute($queryHandle); } } catch (Exception $e) { /* * unit test: ADOdbException/ * _prepareAndExecute/throwDBException_complexQuery.phpt */ throw new XML_Query2XML_DBException($configPath . ': Could not execute the following SQL ' . 'query: ' . $query . '; ' . $e->getMessage()); } if ($result === false && function_exists('ADODB_Pear_Error')) { $result = ADODB_Pear_Error(); } if (class_exists('PEAR_Error') && $result instanceof PEAR_Error) { /* * unit test: ADOdbPEAR/ * _prepareAndExecute/throwDBException_complexQuery.phpt */ throw new XML_Query2XML_DBException($configPath . ': Could not execute the following SQL query: ' . $query . '; ' . $result->toString()); } elseif ($result === false) { /* * unit test: ADOdbDefault/ * _prepareAndExecute/throwDBException_complexQuery.phpt */ throw new XML_Query2XML_DBException($configPath . ': Could not execute the following SQL query: ' . $query . ' (false was returned)'); } return $result; }