7 Feb 2022 at 01:33 #1 Mrwong Mrwong Permabanned Joined 22 Mar 2020 Posts 2,337 what the best way via the myphpadmin to do this. cant sell something before you buy, using dates. So you buy it 1 nov but you cant sell it before that given date.
what the best way via the myphpadmin to do this. cant sell something before you buy, using dates. So you buy it 1 nov but you cant sell it before that given date.
7 Feb 2022 at 01:41 #2 Subliminal Aura Subliminal Aura Soldato Joined 27 Oct 2006 Posts 6,972 Location London Code: select product_id from products where release_date > "2022-11-01 00:00:00"
7 Feb 2022 at 02:02 #3 Mrwong Mrwong Permabanned OP Joined 22 Mar 2020 Posts 2,337 Subliminal Aura said: Code: select product_id from products where release_date > "2022-11-01 00:00:00" Click to expand... What I mean is, in the gui tables you lock them so you cant enter a date before you purchase the item. you buy car on the 10 nov, but the sell column must start from the date given in the buy column.
Subliminal Aura said: Code: select product_id from products where release_date > "2022-11-01 00:00:00" Click to expand... What I mean is, in the gui tables you lock them so you cant enter a date before you purchase the item. you buy car on the 10 nov, but the sell column must start from the date given in the buy column.
7 Feb 2022 at 09:15 #4 Dolph Dolph Man of Honour Joined 17 Oct 2002 Posts 50,385 Location Plymouth I wouldn't do this at database level, unless the people using it are going to be directly modifying the database tables (which would be a bad idea). This sort of data dependent validation belongs in the application layer, not the database itself. If you really want to do it, you would be looking to add a check constraint. Last edited: 7 Feb 2022
I wouldn't do this at database level, unless the people using it are going to be directly modifying the database tables (which would be a bad idea). This sort of data dependent validation belongs in the application layer, not the database itself. If you really want to do it, you would be looking to add a check constraint.