I have a database table contains:
userid, username,months.
Is it possible store more than one number of months in a single field for one user. means that for example for user 1,name khan,months 1,2,3,4,5,6,7 or jan,feb,mar,ap,may,jun etc. is it possible????if yes then how please help me
Loading
Suthish NairPosted Jul 6, 2011, 4:27 PM
Sam HobbsPosted Jul 6, 2011, 5:50 PM
You also did not say if the multiple months consist of a single range; in other words, 1-7 (or jan-jul) for January through July. If a single range, then you could have a start month and an end month. If not a single range, then you could create 12 boolean fields and set them to true or false.
saifullah khanPosted Jul 6, 2011, 7:24 AM
Posted Jul 6, 2011, 7:15 AM
Jaganathan BantheswaranPosted Jul 6, 2011, 7:09 AM
Just make months column as type of varchar and store the months separated by comma.
While retrieving the months split it by comma and do the stuff.