mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Optimize OTS_House::load function with appropriate FETCH_ASSOC
This commit is contained in:
parent
d73aceb272
commit
3e00c52128
@ -60,12 +60,7 @@ class OTS_House extends OTS_Row_DAO
|
||||
private $tiles = array();
|
||||
|
||||
public function load($id) {
|
||||
$this->data = $this->db->query('SELECT * FROM `houses` WHERE `id` = ' . $id )->fetch();
|
||||
foreach($this->data as $key => $value) {
|
||||
if(is_numeric($key)) {
|
||||
unset($this->data[$key]);
|
||||
}
|
||||
}
|
||||
$this->data = $this->db->query('SELECT * FROM `houses` WHERE `id` = ' . $id )->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function find($name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user