I'm working on a kind of shoppingsystem where have 1 main product what can be purchased by selected dates.
not a date range but single day's , as i making this step-by-step and my php skils are limited i assume that i frequently will visit this site.
I hope whenever see some other posts i am able to help , and hope i help correctly.
Anyway here's my issue , i have this database call:
Code: Select all
$result = $db->sql_query("SELECT UNIX_TIMESTAMP(calendar_date) AS calendar_date, calendar_id, calendar_price, did FROM calendar WHERE MONTH(calendar_date)='$monthID'");As you can see it load events as products (it took a lot of frustration when making this)
I now need to combine some main products to this page.
The database i think is already prepared for it
my db stucture is the folowing
calendar (holding al day's calendar_id , did(= the day id can be from 1 to 31) , calandar_date , calendar_price)
items (holding all main products , product_id , product_description, qty)
products_to_calendar(here i sayed product_id X belong to calendar_id x till xxx)
My plan is to also make a check that 1 date to 1 product cant be ordered more as 30 times.
I hope it is a bit clear.