Skip to content

Instantly share code, notes, and snippets.

switch ($infoW["minType"]) {
case "Q": // must purchase at least X
case "Q+": // must purchase more than X
case "Q-": // must purchase at least one, no more than X
$minQ = "select case when sum(ItemQtty) is null
then 0 else sum(ItemQtty) end
" . $this->baseSQL($transDB, $coupID, 'upc');
$minR = $transDB->query($minQ);
$minW = $transDB->fetch_row($minR);
$validQtty = $minW[0];
<?php
/*******************************************************************************
Copyright 2013 Whole Foods Co-op
This file is part of IT CORE.
IT CORE is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
<?php
namespace Project\API {
class Foo
{
// actual functionality here
}
}