Im trying to create some php codes where I can give a customer a discount if they buy six or more items
Please give me an example on how i could write this...
The Quantities of the different items are held on different database rows...Im trying to get the codes to add up all the Quantities so when i write the codes like this
if (itemQuantity >= 6) {
echo "//codes go here";
}
** Also so far i wrote something like this -
itemQ = "SELECT quantity FROM ordersitem WHERE id=" . $_SESSION['SESS_ORDERNUM'] ";";
But the codes are still not working when i try to call for a grand total of Quantity...
PLEASE HELP ^^ Thanks in advance
Please give me an example on how i could write this...
The Quantities of the different items are held on different database rows...Im trying to get the codes to add up all the Quantities so when i write the codes like this
if (itemQuantity >= 6) {
echo "//codes go here";
}
** Also so far i wrote something like this -
itemQ = "SELECT quantity FROM ordersitem WHERE id=" . $_SESSION['SESS_ORDERNUM'] ";";
But the codes are still not working when i try to call for a grand total of Quantity...
PLEASE HELP ^^ Thanks in advance