O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Today Only! Buy One, Get One Free!

BFG promotions work as follows: If a customer buys over a threshold amount of a given book or books from a given category, that customer receives a free gift. As with most sites, the gifts themselves aren't “normal” merchandise; you won't find the gift items by searching the categories.

In this example, two promotions will be available at launch. Buy Javabeans Unleashed and get a can of coffee, and buy any two J2ME books and get a PDA cover.

First you have to enter the two promotional items and the two promotions (see Listing 12.1).

Listing 12.1. Sample Data for the PROMOTION Table
 insert into PRODUCT (TITLE, PUB_DATE, ISBN, DESCRIPTION, PRICE) values ('Genuine Nagahyde PDA Carrying Case', '1998-12-22','PALMCASE','A ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required