Are you trying to create a table called test in database test perhaps? That throws errors on my system.

Did you try running it straight to mysql? Perhaps you are not allowed to connect/create tables?
or..?

J.

    the first one I ran through the mysql shell, and it worked fine, but if I try to do it with PHP, it gives me the error.

    and, no I am not trying to create table test in db test, I am creating it in db blog.

      If you RTFM for CREATE TABLE...then it's pretty obvious where the error is.

      It's also pretty obvious even if you don't read anything at all other than the code in that post.

      In fact, taking the time to fix it yourself would prolly have been several orders of magnitude quicker than posting yet another reply to this thread.

      However, as I was reading this and thinking that, I came to realize that I'm glad you posted after all. I mean, yeah, at first I thought it would be a waste of my time to try to help someone to lazy to help themselves. Actually, I even thought it'd be a waste of my time to finish reading the thread.

      But then I realized, hey, it's nice to see that there really is a pay off for all that time I spent reading the manual, checking out articles, and following up on examples and tutorials. Thanks for showing those of us who took the time to open another window, that are our 3 clicks and 5 minutes weren't in vain after all.

        Originally posted by dnszero
        If you RTFM for CREATE TABLE...then it's pretty obvious where the error is.

        It's also pretty obvious even if you don't read anything at all other than the code in that post.

        In fact, taking the time to fix it yourself would prolly have been several orders of magnitude quicker than posting yet another reply to this thread.

        However, as I was reading this and thinking that, I came to realize that I'm glad you posted after all. I mean, yeah, at first I thought it would be a waste of my time to try to help someone to lazy to help themselves. Actually, I even thought it'd be a waste of my time to finish reading the thread.

        But then I realized, hey, it's nice to see that there really is a pay off for all that time I spent reading the manual, checking out articles, and following up on examples and tutorials. Thanks for showing those of us who took the time to open another window, that are our 3 clicks and 5 minutes weren't in vain after all.

        What he said.................😉

          I did read the manual for CREATE TABLE, and the anwser still eludes me, If you would be nice enought to point out my error, I wouldent have to make another reply to this thred.

            In your third post:
            $result = mysql_query ("CREATE TABLE IF NOT EXISTS test(
            name VARCHAR(50),
            date VARCHAR(25),
            message LONGTEXT
            ");

            Add a right paren after LONGTEXT.

              well... thank you very much!

              /me slaps myself for not seeing that small, yet obvious little detail... :o

                7 days later

                Originally posted by ahundiak
                In your third post:
                $result = mysql_query ("CREATE TABLE IF NOT EXISTS test(
                name VARCHAR(50),
                date VARCHAR(25),
                message LONGTEXT
                ");

                Add a right paren after LONGTEXT.

                Stop, dude, you're blinding me!!!

                😃 😃

                  by the way... you can't create a row named "date"... "date" is a reserved word... call it "timestamp" or "Ashley" if you like 😃

                    Would this be an appropriate time to post the link to the MySQL reserved words list ?

                    http://www.mysql.com/doc/en/Reserved_words.html

                    In which Date does not appear.

                    However when using the MSSQL - some reserved words can be used and referred to if [ ] are used around them in a query... such as [user].

                      Write a Reply...