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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 29, 2006 Share Posted August 29, 2006 And probably UNSIGNED, too. Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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. Quote Link to comment 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) Quote Link to comment 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. 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.