» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2006, 11:59 AM
woods woods is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
woods is on a distinguished road
Default definition of mysql db- correct or incorrect

Hi

Is this a wrong definition of a mysql db? (no defaults defined) :

`date1` int(10) default NULL,
`date2` int(10) default NULL,
`num_jokes` int(8) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`path` text NOT NULL,
etc...
etc...

Thanks and bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-09-2006, 12:00 PM
naughtyboy naughtyboy is offline
OSP Starters
 
Join Date: Jul 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
naughtyboy is on a distinguished road
Default

did you mean table? because a table is different from a database

i think what you're looking at is phpmyadmin output, and it has this nasty habit of writing default NULL when of course that is the default DEFAULT -- if you know what i mean -- when you declare a NULLable column

no, it is not a wrong definition, but there are a couple of things that might be "iffy" --

the two dates should probably be DATE or DATETIME datatypes if you plan to do any sort of date comparisons (e.g. find all rows for the previous month)

is num_jokes a counter? because normally one doesn't store this type of data, because it's redundant and can be derived, and because if you store it, it will have to be updated constantly (inefficient) -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL failing? Blinck MySQL Forums 1 01-04-2007 07:08 AM
correct my incorrect code mikey MySQL Forums 1 07-30-2006 11:40 AM
Getting MySQL & PHP to communicate JCH MySQL Forums 0 05-29-2006 02:52 PM
MySQL 5 and MySQL 4.1 on One Machine ?? omen MySQL Forums 1 12-09-2005 07:07 AM
MySQL 5.1.3-alpha has been released gunet MySQL Forums 0 12-09-2005 04:55 AM


All times are GMT. The time now is 12:13 PM.