mysql syntax error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • red

    mysql syntax error

    I don't see why mysql is telling me the following is a syntax error:


    create table articles
    { file char(30) not null
    };


    What is wrong with that ?

    red
  • Chris Hope

    #2
    Re: mysql syntax error

    red wrote:
    [color=blue]
    > I don't see why mysql is telling me the following is a syntax error:
    >
    >
    > create table articles
    > { file char(30) not null
    > };
    >
    >
    > What is wrong with that ?
    >
    > red[/color]

    Use parentheses (), not curlies {}

    create table articles
    ( file char(30) not null
    );

    --
    Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/

    Comment

    • Steve

      #3
      Re: mysql syntax error

      red wrote:[color=blue]
      > I don't see why mysql is telling me the following is a syntax error:
      >
      >
      > create table articles
      > { file char(30) not null
      > };
      >
      >
      > What is wrong with that ?
      >
      > red[/color]
      Wrong braces. Use (), not {}

      Steve

      Comment

      • Tony Marston

        #4
        Re: mysql syntax error

        If you want an easy way to maintain your MySQL databases then try using
        phpMyAdmin from http://www.phpmyadmin.net/

        --
        Tony Marston

        This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




        "red" <groups2@reenie .org> wrote in message
        news:qSq5d.1513 547$ic1.151915@ news.easynews.c om...[color=blue]
        >I don't see why mysql is telling me the following is a syntax error:
        >
        >
        > create table articles
        > { file char(30) not null
        > };
        >
        >
        > What is wrong with that ?
        >
        > red[/color]


        Comment

        • red

          #5
          Re: mysql syntax error

          Tony Marston wrote:
          [color=blue]
          > If you want an easy way to maintain your MySQL databases then try using
          > phpMyAdmin from http://www.phpmyadmin.net/
          >[/color]

          Thanks everyone for the advice about the parentheses. I was reading from
          a book, and I guess my eyes were fooling me.

          I use phpmyadmin on my online server, but on my windows xp box, here's
          how far I got with phpmyadmin:



          "4. PHP 5 no longer bundles MySQL client libraries...
          enable the extension php_mysql.dll inside php.ini"

          I have the php_mysql.dll file in my php5 installation, and I know where
          the php.ini file is. But I don't know what is meant by "enable the
          extension" Can anyone please explain this ? Thanks.

          Comment

          • red

            #6
            Re: mysql syntax error

            red wrote:
            [color=blue]
            > Tony Marston wrote:
            >[color=green]
            >> If you want an easy way to maintain your MySQL databases then try
            >> using phpMyAdmin from http://www.phpmyadmin.net/
            >>[/color]
            >
            > Thanks everyone for the advice about the parentheses. I was reading from
            > a book, and I guess my eyes were fooling me.
            >
            > I use phpmyadmin on my online server, but on my windows xp box, here's
            > how far I got with phpmyadmin:
            >
            > http://www.zend.com/manual/faq.datab...ses.mysql.php5
            >
            > "4. PHP 5 no longer bundles MySQL client libraries...
            > enable the extension php_mysql.dll inside php.ini"
            >
            > I have the php_mysql.dll file in my php5 installation, and I know where
            > the php.ini file is. But I don't know what is meant by "enable the
            > extension" Can anyone please explain this ? Thanks.[/color]

            I finally figured it out.
            in the php.ini file, remove the semicolon in front of
            ;extension=php_ mysql.dll

            It seems alot of people problems starting mysql in php5. I'll include my
            experience in case it helps, although most people aren't as lost as I
            am. Originally, I didn't figure this out because I was looking at the
            php.ini in windows, which didn't have this line. Turns out my php.ini is
            for php5 is in c:\php.

            Also, I found http://www.faqts.com/knowledge_base/...html/aid/23162
            helpful.

            Comment

            Working...