Jump to content

Complex MySQL Query


FishSword

Recommended Posts

Hiya,

 

I have a table that contains book purchase information for an online book shop.

The database structure can be found below:

  • Purchase_ID:
    Used as a unique identifier for the purchase

  • Book_ID:
    Used to store the book that was purchased

  • Customer_ID:
    Used to store the book purchaser

  • Purchase_Date:
    Used to store the purchase date.

  • Book_Selected:
    Define whether or not book is entered into competition.

 

Upon clicking a link containing a particular "Purchase ID", how do I change the value of the "Book_Selected" field to "1", whilst changing the "Book_Selected" field values to "2" for any other Purchase ID's that have the same "Book ID".

 

Cheers ;)

Link to comment
https://forums.phpfreaks.com/topic/229671-complex-mysql-query/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.