prepare("delete from promotion where id = ?"); $statement->bind_param("i", $_POST['id']); $statement->execute(); break; } case "add": { $statement = $cursor->prepare("insert into webs.promotion (`product`, `price_buff`, `count_buff`) values (?, ?, ?)"); $statement->bind_param("idi", $_POST['product_id'], $_POST['price_buff'], $_POST['count_buff']); $statement->execute(); break; } } $promo_id = $_POST['id']; $new_status = $_POST['status']; if (!$promo_id) break; if (!$new_status) break; $statement = $cursor->prepare("update `promo` set status = ? where id = ?"); $statement->bind_param("ii", $new_status, $promo_id); $statement->execute(); } while (false); ?> price_buff, $promo->count_buff); echo <<<"EOF"
$promo->product_id $promo->name $promo->count_buff $promo->price_buff $promo_str
EOF; } ?> aanbiedingen

aanbieding toevoegen

huidige aanbiedingen

query("select promotion.id, product.id as product_id, product.name, count_buff, price_buff from promotion join product on product.id = promotion.product"); while ($promo = $res->fetch_object()) promo_template($promo); ?>
product id product naam per aantal ver­menig­vuldigings­factor zichtbaar als verwijderen