Código:
El error que me devuelve es: function count($whereAddOnly = false)
{
global $_DB_DATAOBJECT;
$t = $this->__clone();
$quoteEntities = @$_DB_DATAOBJECT['CONFIG']['quote_entities'];
$items = $t->table();
if (!isset($t->_query)) {
DB_DataObject::raiseError(
"You cannot do run count after you have run fetch()",
DB_DATAOBJECT_ERROR_INVALIDARGS);
return false;
}
$DB = $t->getDatabaseConnection();
if (!$whereAddOnly && $items) {
foreach ($items as $key => $val) {
if (isset($t->$key)) {
$kSql = $quoteEntities ? $DB->quoteEntity($key) : $key;
$t->whereAdd($kSql . ' = ' . $DB->quote($t->$key));
}
}
}
$keys = $this->keys();
if (!$keys[0]) {
echo 'CAN NOT COUNT WITHOUT PRIMARY KEYS';
exit;
}
$table = ($quoteEntities ? $DB->quoteEntity($this->__table) : $this->__table);
$key_col = ($quoteEntities ? $DB->quoteEntity($keys[0]) : $keys[0]);
$as = ($quoteEntities ? $DB->quoteEntity('DATAOBJECT_NUM') : 'DATAOBJECT_NUM');
$r = $t->_query(
"SELECT count({$table}.{$key_col}) as $as
FROM $table {$t->_join} {$t->_query['condition']}");
if (PEAR::isError($r)) {
return false;
}
$result = &$_DB_DATAOBJECT['RESULTS'][$t->_DB_resultid];
$l = $result->fetchRow();
return $l[0];
}
Código:
En otros getDatabaseConnection() no me da problema, sin embargo en ese objeto en concreto sí.PHP Fatal error: Maximum execution time of 30 seconds exceeded in
He pensado que pueda estar limitada la conexión al usuario a un determinado número pero no encuentro nada en concreto

