Results 1 to 4 of 4

Thread: new to mySQL

  1. #1
    Join Date
    Nov 2006
    Location
    Saskatoon, Saskatchewan, Canada
    Posts
    2

    Question Unanswered: new to mySQL

    hey guys im just learning php and mySQL right now so this will sound really noobish but ive been trying to setup a table in my database in phpmyadmin i clicked on the little php tag under the phpmyadmin logo and entered the following code in the window that opened:

    CREATE TABLE meminfo (name VARCHAR, email VARCHAR, phone INT, adress FLOAT, comments VARCHAR);

    after that it gives me this error:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' email VARCHAR, phone INT, adress FLOAT, comments VARCHAR)' at line 1

    im sure its probably a small syntax error or something but im hoping more experienced eyes might help me pick it out ive looked through it several times and cant seem to find whats wrong. my server runs MySQL client version: 4.1.10

    thanks for your time

    Reguards,
    Durendal420
    Last edited by Durendal420; 11-19-06 at 23:16.

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    For VARCHAR data type you must specify a maximum size - try something like - VARCHAR(255)

  3. #3
    Join Date
    Nov 2006
    Location
    Saskatoon, Saskatchewan, Canada
    Posts
    2
    works great thanks a lot

    Reguards,
    Durendal420

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    adress FLOAT?????
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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