note 108795 rejected from function.eval by danbrown
| From: | danbrown@php.net | Date: | Fri, 25 May 2012 15:21:57 +0000 |
| Subject: | note 108795 rejected from function.eval by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-188235@lists.php.net to get a copy of this message | ||
Note Submitter: wifipc at yahoo dot com
----
Hi there, guys can you HELP me with this problem?
***Here is my PROBLEM***
It is about the status (1,0) of schoolyear. 1 is on/activate, 0 is off/inactivate.
So in my form i have combo box of school year, and button 'Set Activate', inside the
school year combobox, the option are 1999-2000, 2001-2002, 2003-2004 and the rest of the year.
this is my form(imagine):
Select SY: ((combobox))
Set activate <<--(button)
If im going to choose the 2001-2002 in the combobox, then i will select/click the button 'Set
Activate'. Then in my database tblschoolyear, i have 'schoolid', 'syear1',
'syear2', 'date', 'activestatus'.
this is my tblschoolyear in the database(imagine):
-----------------------------------------------------------
schoolid | syear1|syear2 |date |activestatus
-----------------------------------------------------------
3 |1999 |2000 |2012-05-06 20:13:03 |0
8 |2001 |2002 |2012-05-06 20:13:03 |0
2 |2003 |2004 |2012-05-06 20:13:03 |0
So the column of 2001-2002, the active status is default '0', it will be turn to
'1' because i activate the 2001-2002.
||***it will be like this***||
-----------------------------------------------------------
schoolid | syear1|syear2 |date |activestatus
-----------------------------------------------------------
3 |1999 |2000 |2012-05-06 20:13:03 |0
8 |2001 |2002 |2012-05-06 20:13:03 |1
2 |2003 |2004 |2012-05-06 20:13:03 |0
And then if i select again to activate the school year 2003-2004, in the database 'active
status', will be turn to 1. and 2001-2002, will be 0 again.
||***it will be like this***||
-----------------------------------------------------------
schoolid | syear1|syear2 |date |activestatus
-----------------------------------------------------------
3 |1999 |2000 |2012-05-06 20:13:03 |0
8 |2001 |2002 |2012-05-06 20:13:03 |0
2 |2003 |2004 |2012-05-06 20:13:03 |1
Same thing happen if i will goin to choose again in the school year. Can you please help me with my
problem? thanks so much in advance for the response :) takecare