2005-08-17, 10:55 PM
ok, so i was making the install script for my new site (mybbfree.com) and i noticed something strange.
"INSERT INTO
i was thinking wtf are all these yes's
anyway my suggestion is, scrap the yes/no crap and use tinyint and 1/0 that goes for anywhere in the database where you have a yes/no option.
Anywhere possible you shouldn't be storing useless data and yes is useless when a 1 will suffice
"INSERT INTO
mybb_usergroups
(gid
, type
, title
, description
, namestyle
, usertitle
, stars
, starimage
, image
, isbannedgroup
, canview
, canviewprofiles
, candlattachments
, canpostthreads
, canpostreplys
, canpostattachments
, canratethreads
, caneditposts
, candeleteposts
, candeletethreads
, caneditattachments
, canpostpolls
, canvotepolls
, canusepms
, cansendpms
, cantrackpms
, candenypmreceipts
, pmquota
, cansendemail
, canviewmemberlist
, canviewcalendar
, canaddpublicevents
, canaddprivateevents
, canviewonline
, canviewwolinvis
, canviewonlineips
, cancp
, issupermod
, cansearch
, canusercp
, canuploadavatars
, canratemembers
, canchangename
, showforumteam
, usereputationsystem
, cangivereputations
, reputationpower
, maxreputationsday
) VALUES (6, 1, 'Moderators', '', '<font color=\"#CC00CC\"><b>{username}</b></font>', 'Moderator', 5, 'images/star.gif', '', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 0, 'yes', 'yes', 'yes', 'no', 'no', 'yes', 'no', 'no', 'no', 'no', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 'yes', 3, 10);"i was thinking wtf are all these yes's
anyway my suggestion is, scrap the yes/no crap and use tinyint and 1/0 that goes for anywhere in the database where you have a yes/no option.
Anywhere possible you shouldn't be storing useless data and yes is useless when a 1 will suffice