20 lines
645 B
PHP
20 lines
645 B
PHP
|
<?php
|
||
|
class SimulatorTheme extends ObjectModel
|
||
|
{
|
||
|
public $id_simulator_theme;
|
||
|
public $id_simulator;
|
||
|
public $name;
|
||
|
|
||
|
public static $definition = array(
|
||
|
'table' => 'simulator_theme', 'primary' => 'id_simulator_theme', 'multilang' => false,
|
||
|
'fields' => array(
|
||
|
'id_simulator' => array('type' => self::TYPE_INT),
|
||
|
'name' => array('type' => self::TYPE_STRING),
|
||
|
),
|
||
|
);
|
||
|
|
||
|
public static function getFromProduct($id_product)
|
||
|
{
|
||
|
return Db::getInstance()->getValue('SELECT `id_simulator_theme` FROM `'._DB_PREFIX_.'product` WHERE id_product = '.(int)$id_product);
|
||
|
}
|
||
|
}
|