Change date
Posted: Tue Mar 13, 2012 2:31 am
Hi,
i have two fields,loan_type and member_type, that i take the values from a database and another field with date.
When i choose the values from that field which are specific i want to change the date
for example in sql i would write it something like that
SELECT CURRENT_DATE + INTERVAL
CASE WHEN membership_type = 'staff'
AND Loan_type = 'short' THEN 10
WHEN membership_type = 'staff'
AND Loan_type = 'long' THEN 20
WHEN membership_type = 'student'
AND Loan_type = 'short' THEN 30
WHEN membership_type = 'student'
AND Loan_type = 'long' THEN 40 END DAY
how can i do that in nubuilder? with php or javascript?
i have two fields,loan_type and member_type, that i take the values from a database and another field with date.
When i choose the values from that field which are specific i want to change the date
for example in sql i would write it something like that
SELECT CURRENT_DATE + INTERVAL
CASE WHEN membership_type = 'staff'
AND Loan_type = 'short' THEN 10
WHEN membership_type = 'staff'
AND Loan_type = 'long' THEN 20
WHEN membership_type = 'student'
AND Loan_type = 'short' THEN 30
WHEN membership_type = 'student'
AND Loan_type = 'long' THEN 40 END DAY
how can i do that in nubuilder? with php or javascript?