Jump to content

Archived

This topic is now archived and is closed to further replies.

Greaser9780

newbie here

Recommended Posts

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
streak
rank [/color]
I am not sure what commands to put in to define data on the last four rows. Can somebody help me?

Share this post


Link to post
Share on other sites
And probably UNSIGNED, too.

Share this post


Link to post
Share on other sites
[quote author=Greaser9780 link=topic=106053.msg423855#msg423855 date=1156844477]
...
wins
losses
streak
rank

I 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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.