예제 #1
0
 /**
  * returns all orders of a meal at givne date
  * @param numberic_string $ID the ID of the meal whose orders to return
  * @param date the date
  * @return array of orders
  */
 function getAllOrdersOfMealAtDate($ID, $date)
 {
     return parent::getTableData(sprintf('MID = "%s" AND date = "' . $date . '" ORDER BY date', $ID, $date));
 }
예제 #2
0
 public function setColor($pc_ID, $color)
 {
     try {
         $ids = TableManager::getTableData(sprintf("pc_ID=%s", $pc_ID));
         foreach ($ids as &$id) {
             TableManager::alterEntry($id['ID'], 'color', $color);
         }
     } catch (Exception $e) {
         echo "Error getting priceclass: " . $e->getMessage();
         die;
     }
 }
예제 #3
0
 /**
  * returns the Orders that are dated [mealdate] between the first and the second Date
  * Format can be timestamp or YYYY-MM-DD
  */
 function getOrdersBetMealdate($startdate, $enddate)
 {
     ///@todo sicher das Timestamp hier von MySQL automatisch konvertiert wird?
     return parent::getTableData(sprintf('mealdate BETWEEN %s AND %s', $startdate, $enddate));
 }
예제 #4
0
 function getClassByUsername($username)
 {
     $user = parent::getTableData('username="******"');
     return $user[0]['class'];
 }
예제 #5
0
 function getPriceClassName($pc_ID)
 {
     try {
         $pcn = TableManager::getTableData(sprintf("pc_ID=%s LIMIT 1", $pc_ID));
     } catch (Exception $e) {
         echo "Error getting priceclass: " . $e->getMessage();
         die;
     }
     return $pcn;
 }