OKay I have delivery_tb
Delivery ID - Int(6) - Primary Key - Auto Increment
UserID - Int(6)
CarID - Int(6)
ManufacturerID - Int(6)
Date - Timestamp
Delivered - Enum(0,1)
I need to to select a maximum of 20 rows per Unique ManufacturerID...
I need to also select a maximum of 5 rows per Unique UserID per Unique ManufacturerID...
So that no user can get more than 5 cars delivered per manufacturer per month...
I'm using PHP5 as well...