+ Responder ao Tópico



  1. #1

    Padrão Erro no mysql 1064

    Boa Tarde

    Quando temto criar a tabela

    CREATE TABLE radpostauth {


    id int(11) NOT FULL auto_increment,
    username varchar(64) NOT FULL default '',
    pass varchar(64) NOT FULL default '',
    reply varchar(32) NOT FULL default '',
    authdate varchar timestamp(14) NOT FULL,
    PRIMARY KEY (id)
    } ;


    Da o seguinte erro.

    ERROR 1064 (42000) you have error in your sql sintax: check the manul that corresponds to your mysql server version for the to use near '{ id int(11) NOT FULL auto_increment, username varchar(64) NOT FULL default '', ' at line 1


    se alguém puder ajudar agradeço.

  2. #2

    Padrão Re: Erro no mysql 1064

    Substitua todos os FULL por NULL .

  3. #3
    Avatar de shuttner
    Ingresso
    Aug 2008
    Localização
    Boa Vista - Roraima
    Posts
    257
    Posts de Blog
    1

    Padrão Re: Erro no mysql 1064

    Você tem que usar () e não {}
    tipo timestamp não informa o tamanho e não se colocar varchar na frente de timestamp

    CREATE TABLE radpostauth (
    id int(11) NOT NULL auto_increment,
    username varchar(64) NOT NULL default '',
    pass varchar(64) NOT NULL default '',
    reply varchar(32) NOT NULL default '',
    authdate timestamp NOT NULL,
    PRIMARY KEY (id)
    );