Greaser9780 Posted August 29, 2006 Share Posted August 29, 2006 I want to create a table with the following:[color=blue]CREATE TABLE bhd_singles ( clanid int(25) NOT NULL auto_increment, clan_name varchar(25) NOT NULL default '', last_battle NOT NULL default '0000-00-00 00:00:00', wins losses streakrank [/color]I am not sure what commands to put in to define data on the last four rows. Can somebody help me? Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/ Share on other sites More sharing options...
wildteen88 Posted August 29, 2006 Share Posted August 29, 2006 Use INT if those last four rows hold a number. Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-82088 Share on other sites More sharing options...
fenway Posted August 29, 2006 Share Posted August 29, 2006 And probably UNSIGNED, too. Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-82227 Share on other sites More sharing options...
Greaser9780 Posted August 30, 2006 Author Share Posted August 30, 2006 where can I find info on how to use those? as in what area in this site? Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-82661 Share on other sites More sharing options...
paul2463 Posted August 30, 2006 Share Posted August 30, 2006 http://www.phpfreaks.com/MySQL_Reference/Column-Types/2.php Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-82668 Share on other sites More sharing options...
Greaser9780 Posted September 1, 2006 Author Share Posted September 1, 2006 OK neither of what I was told to use was on that list Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-83906 Share on other sites More sharing options...
AndyB Posted September 1, 2006 Share Posted September 1, 2006 [quote author=Greaser9780 link=topic=106053.msg423855#msg423855 date=1156844477]...wins losses streakrankI am not sure what commands to put in to define data on the last four rows. Can somebody help me?[/quote][quote author=wildteen88 link=topic=106053.msg423860#msg423860 date=1156845459]Use INT if those last four rows hold a number.[/quote]So, do they hold a number? If so, of what size? If not, what is going to go in each of those fields.First you help us, then we help you. Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-83931 Share on other sites More sharing options...
Greaser9780 Posted September 5, 2006 Author Share Posted September 5, 2006 Yes they will all hold numbers.Wins will be 1-120, Losses will be 1-50 streak will be 1-100 and rank is actually a math problem dividing losses by wins( not sure if this belongs in the table or not) Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-86197 Share on other sites More sharing options...
fenway Posted September 5, 2006 Share Posted September 5, 2006 Yeah, UNSIGNED SMALLINT will probably do the trick... and no, I wouldn't store the rank in this table -- if anything, if another summary table. Link to comment https://forums.phpfreaks.com/topic/18990-newbie-here/#findComment-86328 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.