liamloveslearning Posted April 15, 2011 Share Posted April 15, 2011 Hi all, I need to create a table which holds a list of values, for EG 1 PHP 2 MySQL 3 HTML 4 JS The reason im doing this is so when a user visits X page on my site, they are presented with a list of possible options which they can tick, for instance if you were asked what languages your fluent with you would tick HTML and JS (or w/e applies to you) What would be the best way of constructing the table? Thanks Link to comment https://forums.phpfreaks.com/topic/233854-storing-values-in-table/ Share on other sites More sharing options...
blacknight Posted April 15, 2011 Share Posted April 15, 2011 create a table with what ever other field you wana use to identify the user and a fielf for each langrage ex: CREATE TABLE IF NOT EXISTS `roster_talenttree_data` ( `id` int(11) NOT NULL default '0', `js` tinyint(2) NOT NULL default '0', `html` tinyint(2) NOT NULL default '0', `php` tinyint(2) NOT NULL default '0', `js` tinyint(2) NOT NULL default '0', PRIMARY KEY (`id`) ) ; then use 1 for yes o is default so its no .. id can be user is or change it to varchar and be user name Link to comment https://forums.phpfreaks.com/topic/233854-storing-values-in-table/#findComment-1202184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.