Its slightly giving wrong result:
My shopping basket is displaying weight of 20kg and size of 2000cm3
in my database for shipping costs I have set a price of £50 if the weight up to is 20kg and size up to is 2000cm3
However the delivery cost result on the page shows nothing.
If I change the below code to to use >= for both ShippingCostWeightTo and ShippingCostSize then it shows £50 as the delivery cost. But that doesnt make sense, since I am saying if my database value is more than or equal to the actual shopping basket value. I thought it should have been less than or equal to?
<?php
$rsDeliveryCost = new WA_MySQLi_RS("rsDeliveryCost",$ecartdb,1);
$rsDeliveryCost->setQuery("SELECT * FROM shippingcosts WHERE ShippingCostZone = ? AND ShippingCostWeightTo <= ? AND ShippingCostSize <= ?");
$rsDeliveryCost->bindParam("s", "".$rsShippingZone->getColumnVal("ShippingZone") ."", "-1"); //colname
$rsDeliveryCost->bindParam("s", "".$eCart->DisplayInfo("TotalWeight") ."", "-1"); //colname2
$rsDeliveryCost->bindParam("s", "".$eCart->DisplayInfo("TotalSize") ."", "-1"); //colname3
$rsDeliveryCost->execute();
?>