You haven't exactly given us much information to go on (like schema, for instance), but it sounds as though you have a minimum of
- new column(s) to hold discount
information, probably in its own
table, referenced to your price table
via a foreign key
- some sort of logic (perhaps using
triggers) that can track the
aggregate order amount and set a flag
accordingly
To implement these you will need ALTER TABLE
etc. commands to effect your DDL. These can be scripted, or if you require flow-of-control logic (i.e. only adding columns if they do not already exist), you will have to pack that into a procedure (in MySQL you can only use -if...else
constructs if executing from within a procedure).