PDA

View Full Version : مبتدی: مشکل



Ali110k
شنبه 09 دی 1396, 06:51 صبح
مشکل نوشتن این کد چیه؟

$sql ='SELECT * FROM '.VIVVO_DB_PREFIX.'categories ORDER BY order_num ASC';
$res = vivvo_lite_site::get_instance()->get_db()->query($sql);
while(($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC))){
$this->list[$row['id']] = new Categories(null, $row);
$this->list[$row['id']]->set__category_list ($this);
} $res->free();
$this->list[0] = new Categories();
$this->list[0]->set__category_list ($this);
$this->list[0]->id = 0;
$this->sort_subcategories(0);
vivvo_cache::get_instance()->put('categories', $this->list);

در خط سوم ایراد میگیره.
Fatal error: Call to undefined method MDB2_Error::fetchRow()