otuatail Posted October 11, 2007 Share Posted October 11, 2007 I can't use this script to insert a table. State problem around the TinyInt but documents say it's ok DROP TABLE IF EXISTS `pages`; CREATE TABLE IF NOT EXISTS `pages` ( `id` int(11) NOT NULL auto_increment, `Current` unsigned TINYINT( ) default NULL, `History` varchar(100) default NULL, `Date` varchar(15) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1 ; Now value in brackets but does it need it? I only want a value 0 - 255 Quote Link to comment Share on other sites More sharing options...
Barand Posted October 11, 2007 Share Posted October 11, 2007 try `Current` TINYINT unsigned , Quote Link to comment Share on other sites More sharing options...
otuatail Posted October 11, 2007 Author Share Posted October 11, 2007 Thanks for that. It works. but strange when I look in phpMyAdmin it is tinyint(3) Desmond. Quote Link to comment Share on other sites More sharing options...
Barand Posted October 11, 2007 Share Posted October 11, 2007 INT, TINYINT etc without the (N) will default to the number of digits in the max value that can be stored. Quote Link to comment Share on other sites More sharing options...
otuatail Posted October 11, 2007 Author Share Posted October 11, 2007 Thanks Prob solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.