function getOneRecord() { $record = new lmbMysqlRecord(); $queryId = $this->connection->execute($this->getSQL()); $values = mysql_fetch_assoc($queryId); $record->import($values); mysql_free_result($queryId); if (is_array($values)) { return $record; } }
function at($pos) { $query = $this->query; if (is_array($this->sort_params)) { $query .= ' ORDER BY '; foreach ($this->sort_params as $field => $order) { $query .= $this->connection->quoteIdentifier($field) . " {$order},"; } $query = rtrim($query, ','); } $queryId = $this->connection->execute($query . " LIMIT {$pos}, 1"); $res = mysql_fetch_assoc($queryId); mysql_free_result($queryId); if ($res) { $record = new lmbMysqlRecord(); $record->import($res); return $record; } }