Anyway i used the 'auto_increment' property (i was using the id as primary key) and it works nicely but i was just wondering if we always need to insert a blank entry ('') each time in that field as shown,
Well if you insert the data that way then yes. But if you specify fields you won't have to. For instance:
Code: Select all
INSERT INTO tab1 (field,another_field) VALUES ('field1','field2');
or is there another way of making the field auto-increment when inserting?
Well not when inserting... but you could select the largest id from the table useing MAX in the select... although there isn't much point in that if you can automatically make it increment...
another thing i want to know about these auto-inc fields is, how can i specify the starting value and range over which it valid?
Well it's range changes depending on the field type you put for the primary field. It's first value is always 1... and it goes up the max ammount of data the field type can hold. For instace if you used a tiny int the range would be 1 - 255. So basically the range is changed by the field type.
Also how much web space do you think i'll need to host this board? its going to be for just a few of my friends etc and others in the locality.
btw how much does this forum take up ?
This is extremely hard to determine, the ammount it takes up varies depending on ammount of members, posts, boards, logs, etc. Also different message board system use different ammounts of space... so this isn't something you can get a definate answer on.
For instance I have a dump of mega-tokyo from about a year ago which is 15MB in size. And that was back when this board had around 22,000 posts. Now it's posts has double from that in this year, so I am sure it's much larger. The agigames.com forums are 1.5MB(2000 posts) MB and my CBB board is 1MB(2000 posts). As you can see 1/2 a MB larger than the other board but with around the same ammount of posts.