Bisher bin ich soweit gekommen:
PHP-Code:
<?php
$checkshipping=mysql_fetch_array(mysql_query("select price from shop_shipping_costs where weight between $basket_totalweight and weight "));
?>
Nehmen wir mal an, das
PHP-Code:
<?php
$basket_totalweight
?>
Meine Tabelle für die Versandkosten sieht wie folgt aus:
Code:
weight | price -------------- 0.01 | 4.50 3.00 | 5.00 5.00 | 5.50 8.00 | 6.00 10.00 | 6.50 15.00 | 6.50 20.00 | 7.00 25.00 | 7.50 30.00 | 8.00
Die Spalten weight und price sind jeweils vom Typ decimal.
Ich hoffe jemand kann mir bei meinem Problem helfen.
Vielen Dank im Voraus!
Einen Kommentar schreiben: