User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 375,198 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,996 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 435 | Replies: 8
Reply
Join Date: Mar 2008
Posts: 8
Reputation: cmax is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cmax cmax is offline Offline
Newbie Poster

mysql problem

  #1  
Apr 2nd, 2008
hello, everybody
i have a problem , i have table , it contoin column ORDER ID, customer ID, amount, DATE.
a problem when i type or create this table, i make a mistake i dont know where is my mistake when i type in mySQL database BY using ( MYSQL console),


thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,057
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 229
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: mysql problem

  #2  
Apr 2nd, 2008
Whats the error ?
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation: trudge is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: mysql problem

  #3  
Apr 2nd, 2008
What command did you try to execute? Copy and paste exactly what is on your command line, and the resulting screen.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Join Date: Mar 2008
Posts: 8
Reputation: cmax is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cmax cmax is offline Offline
Newbie Poster

Re: mysql problem

  #4  
Apr 3rd, 2008
my table is called Orders, it have four column , first col is ORDER ID, second col customer ID, third column is AMOUNT n last colum is DATE,
so ma problem i dont know where i make a mistake,
i was typing that
mysq>
  1. CREATE TABLE orders(
  2. ORDER id INT NOT NULL AUTO_INCREMENT,,
  3. customer id INT NOT NULL,
  4. amount DECIMAL(4,2) NOT NULL,
  5. date DATE NOT NULL,
  6. );

can you help where is a my mistake.

THANKS,
Last edited by peter_budo : Apr 3rd, 2008 at 10:45 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Mar 2008
Posts: 8
Reputation: cmax is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cmax cmax is offline Offline
Newbie Poster

mysql

  #5  
Apr 3rd, 2008
table is called Orders, it have four column , first col is ORDER ID, second col customer ID, third column is AMOUNT n last colum is DATE,
so ma problem i dont know where i make a mistake,
i was typing that
mysq>
  1. CREATE TABLE orders(
  2. ORDER id INT NOT NULL AUTO_INCREMENT,,
  3. customer id INT NOT NULL,
  4. amount DECIMAL(4,2) NOT NULL,
  5. date DATE NOT NULL,
  6. );

can you help where is a my mistake.

THANKS,
Last edited by peter_budo : Apr 3rd, 2008 at 10:50 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,057
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 229
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: mysql problem

  #6  
Apr 3rd, 2008
There are so many errors.
1. order id should be order_id
2. same with customer id.
3. You have 2 , in order id line
Try this.
  1. CREATE TABLE orders (
  2. order_id INT NOT NULL AUTO_INCREMENT ,
  3. customer_id INT NOT NULL ,
  4. amount DECIMAL( 4, 2 ) NOT NULL ,
  5. DATE DATE NOT NULL ,
  6. PRIMARY KEY (order_id)
  7. ) ENGINE = INNODB
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,057
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 229
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: mysql

  #7  
Apr 3rd, 2008
Why are you posting the same question so many times ?
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 1,924
Reputation: peter_budo has a spectacular aura about peter_budo has a spectacular aura about peter_budo has a spectacular aura about 
Rep Power: 9
Solved Threads: 221
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Posting Virtuoso

Re: mysql problem

  #8  
Apr 3rd, 2008
Threads merged
Do not flood the forum by posting the same question more than once (ie in multiple forums).
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation: trudge is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: mysql problem

  #9  
Apr 3rd, 2008
There may be a problem with that field named 'DATE', as that is a reserved word. It will always have to be quoted in every query. Perhaps better to rename it 'OrderDate' or something that makes sense.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb MySQL Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 2:25 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC