SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old December 29th, 2003, 03:19 AM
EEEAAA EEEAAA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: California
Posts: 71 EEEAAA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Lightbulb MySQL problem

i'm trying to create a table with PHPMyAdmin:

Quote:
CREATE TABLE `jahinventory` (
`ProductID` INT( 4 ) NOT NULL AUTO_INCREMENT ,
`ProductPic` VARCHAR( 255 ) NOT NULL ,
`ProductName` VARCHAR( 255 ) NOT NULL ,
`ProductPrice` INT( 10 ) NOT NULL ,
`ProductCart` BLOB( 700 ) BINARY NOT NULL ,
`ProductType` VARCHAR( 10 ) NOT NULL ,
PRIMARY KEY ( `ProductID` )
)


and it gives me this error:
Quote:

You have an error in your SQL syntax near '(700) BINARY NOT NULL, `ProductType` VARCHAR(10) NOT NULL, PRIMARY KEY (`Product' at line 1


whats going on?
__________________
uuuugggghhhhh

Reply With Quote
  #2  
Old December 31st, 2003, 12:04 AM
EEEAAA EEEAAA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: California
Posts: 71 EEEAAA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Lightbulb

????

Reply With Quote
  #3  
Old January 2nd, 2004, 10:34 AM
dawson_davis dawson_davis is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 7 dawson_davis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't think you need to set the size on a blob type variable. Try creating your blob column like this instead.

ProductCart` BLOB BINARY NOT NULL ,

Reply With Quote
  #4  
Old January 2nd, 2004, 12:27 PM
EEEAAA EEEAAA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: California
Posts: 71 EEEAAA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Lightbulb

it works, thanks.

now i have 2 tables:

jahinv:
ProductID
ProductPic
ProductName
ProductPrice
ProductCart
ProductType

jahdesc:
ProductID
ProductPic
ProductDesc

how do i create a relationship for both ProductID's between the 2 tables?

Last edited by EEEAAA : January 2nd, 2004 at 12:29 PM.

Reply With Quote
  #5  
Old January 13th, 2004, 02:23 PM
EEEAAA EEEAAA is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: California
Posts: 71 EEEAAA User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Lightbulb

Quote:
Originally posted by EEEAAA
it works, thanks.

now i have 2 tables:

jahinv:
ProductID
ProductPic
ProductName
ProductPrice
ProductCart
ProductType

jahdesc:
ProductID
ProductPic
ProductDesc

how do i create a relationship for both ProductID's between the 2 tables?


this can NOT be a hard question to answer

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > MySQL problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT