public static function totalScaleMoodTypeAndFeeling($moodTypeID, $feelingID) { $brain = Brain::getInstance(); $result = $brain->think("SELECT sum(scale) FROM " . self::$area . " WHERE mood_type_id = {$moodTypeID} AND feeling_id = {$feelingID}"); $row = mysqli_fetch_row($result); return $row[0]; }
public static function moodTypeIDArray() { $brain = Brain::getInstance(); return $brain->selectArray("id", "SELECT id FROM mood_types ORDER BY name"); }
public static function mostCommonFeelingID() { $brain = Brain::getInstance(); return $brain->selectWhere("id", self::$area, "id > 0", " ORDER BY count DESC LIMIT 0,1"); }