Back to PhocacartAttribute class

Method getAttributeType

public static
getAttributeType
(mixed $id)

Method getAttributeType - Source code

public static function getAttributeType($id)
{
    $db = Factory::getDBO();
    $wheres = array();
    $wheres[] = ' id = ' . (int) $id;
    $query = ' SELECT type' . ' FROM #__phocacart_attributes' . ' WHERE ' . implode(' AND ', $wheres) . ' ORDER BY id LIMIT 1';
    $db->setQuery($query);
    $type = $db->loadResult();
    return $type;
}