I'm attempting my first module (for 4.6). I was a little confused by the module-building tutorial, but I went through the whole thing and am now going to give it a try and see if I can make it work.
I'm making a web site that needs to have a list of courses on a page. The courses will belong to programs. I am picturing a form where the user can type in the form information, and check boxes next to each program that the course belongs to. So if the course counts as credit towards program3 and program5, the admin can check the relevant checkboxes -- that is why those program fields are boolean.
The course list will be sortable by column. When the name of the course is clicked on, it will take the user to a page about that course.
Can anyone offer any advice if I am going about this the right way? I'm looking at other modules and trying to modify what I find there. Is the nid the correct primary key to use?
Thanks
CREATE TABLE courselist (
nid int(10) unsigned NOT NULL default '0',
course_start date NOT NULL,
course_end date NOT NULL,
course_name varchar(50) NOT NULL,
city varchar(35),
state_region varchar(30),
country varchar(30),
link_title varchar(30),
page_url varchar(50),
program1 boolean,
program2 boolean,
program3 boolean,
program4 boolean,
program5 boolean,
program6 boolean,
program7 boolean,
program8 boolean,