SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member doakra's Avatar
    Join Date
    Jul 2003
    Location
    Arkansas
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Error creating table in phpmyadmin

    I decidied to take everyone's advice and try to learn php & SQL in order use databases in my webpages. I downloaded and installed phpdev423 and installed it without incident. Everything seems to be working.

    When I run phpmyadmin I can create a database, but when I try to create a table, I keep getting syntax errors in line 1. Below is the info I entered:

    Table Name: newproducts
    fields: 2


    Field 1: item, INT, 6, not null, primary key
    Field 2: itemdesc, text, 25, not null


    Please help.
    Thanks

  2. #2
    3MTA3
    Join Date
    Jul 2003
    Location
    Florida
    Posts
    1,016
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try doing it again, but change the type for the "itemdesc" to VARCHAR
    Last edited by devised; Jul 15, 2003 at 19:27.

  3. #3
    SitePoint Member doakra's Avatar
    Join Date
    Jul 2003
    Location
    Arkansas
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did what you suggested and it worked. Thanks, but can you tell me why it worked? Why can't this field be TEXT? When can I use TEXT as a field type?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •