bahaa Posted September 14, 2011 Share Posted September 14, 2011 Hello everybody, From security and efficiency prospective, what is best to use for the visible field column in database? enum('yes', 'no') or INT 1 for visible and 0 for invisible? Regards, Link to comment Share on other sites More sharing options...
Larry Posted September 14, 2011 Share Posted September 14, 2011 I believe MySQL treats an enum as a special type of INT. There's no real security issue here, but I'd just use an unsigned not null default 0 TINYINT. That would be the most efficient. Link to comment Share on other sites More sharing options...
bahaa Posted September 14, 2011 Author Share Posted September 14, 2011 Thanks Larry Link to comment Share on other sites More sharing options...
Recommended Posts