mysql Default automatically becomes 0??

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mohson
Forum Contributor
Posts: 372
Joined: Thu Dec 02, 2004 6:58 am
Location: London

mysql Default automatically becomes 0??

Post by mohson »

does anyone know why when I change a column in my mysql table it automatically generates a default of 0 for that particular column I dont set it it just generates itself why would this happen

this is what I do

їcode]
ALTER TABLE organisations org_id org_id int(11) not null
ї/code]

why would this make the default 0??

any ideas
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's an integer. zero is the default value of an integer.
Post Reply