Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
válasz
Peter Kiss #8 üzenetére
"mi volt a tesztkörnyezet"
Itt eléggé pontatlan volt, amit írtam, mert nem csak a konfiguráció érdekelt volna, hanem a konkrét kód.A Kohanás kódra:
igazából abbahagytam a bemásolást, és nem raktam be azt, amit még kellett volna: a _load_result() függvényt:..............
/**
* Loads a database result, either as a new record for this model, or as
* an iterator for multiple rows.
*
* @chainable
* @param bool $multiple Return an iterator or load a single row
* @return ORM|Database_Result
*/
protected function _load_result($multiple = FALSE)
{
$this->_db_builder->from(array($this->_table_name, $this->_object_name));
if ($multiple === FALSE)
{
// Only fetch 1 record
$this->_db_builder->limit(1);
}
// Select all columns by default
$this->_db_builder->select($this->_object_name.'.*');
if ( ! isset($this->_db_applied['order_by']) AND ! empty($this->_sorting))
{
foreach ($this->_sorting as $column => $direction)
{
if (strpos($column, '.') === FALSE)
{
// Sorting column for use in JOINs
$column = $this->_object_name.'.'.$column;
}
$this->_db_builder->order_by($column, $direction);
}
}
if ($multiple === TRUE)
{
// Return database iterator casting to this object type
$result = $this->_db_builder->as_object(get_class($this))->execute($this->_db);
$this->reset();
return $result;
}
else
{
// Load the result as an associative array
$result = $this->_db_builder->as_assoc()->execute($this->_db);
$this->reset();
if ($result->count() === 1)
{
// Load object values
$this->_load_values($result->current());
}
else
{
// Clear the object, nothing was found
$this->clear();
}
return $this;
}
}
.....
Új hozzászólás Aktív témák
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- DUNE médialejátszók topicja
- World of Tanks - OFF topic
- PlayStation 5
- Kerékpárosok, bringások ide!
- Miért álltak az oldalak egy hétig, mi történt?
- lezso6: Miért is jó, ha dohányzol?! Megéri rászokni!
- Felpúposodott egy Galaxy Ring, a Samsung besegített
- Elemlámpa, zseblámpa
- Mibe tegyem a megtakarításaimat?
- További aktív témák...
- Dell Latitude 7440 -14"FHD+1 IPS - i5-1345U 16GB - 512GB - Win11 - 1 év garancia + Dokkoló + 240W DC
- SzoftverPremium.hu
- BESZÁMÍTÁS! MSI X370 R5 2600 16GB DDR4 512GB SSD GTX 970 4GB Zalman Z9 Neo FSP 600W
- HP EliteBook 840 G8 i5-1135G7 16GB 512GB 1 év garancia
- HIBÁTLAN iPhone 13 mini 128GB Green -1 ÉV GARANCIA - Kártyafüggetlen, MS3336
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest