Error:1064

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #16
    Ok. There must be something wrong with your server, because both of these queries should be working.
    Check this one. It's as basic as it gets:
    [code=mysql]SELECT (SELECT TRUE);[/code]
    That should work on all MySQL version 4.1 and later.
    What is the exact version of your server btw?

    As far as I know, there is nothing in the configuration that should cause syntax errors like these. Even if you could somehow disable sub queries, I highly doubt it would be causing syntax errors.

    Comment

    • ddtpmyra
      Contributor
      • Jun 2008
      • 333

      #17
      I have version 5.0 and I had same problem after executing your last query statement. It has something to do with the server settings definitely, do you know where I can do the configuration on the server so I can execute this kind of query?

      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 'SELECT TRUE)' at line 1

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #18
        Are you absolutely sure it is version 5.0?
        Because this syntax error is precisely what you would get if you were to execute a subquery on version 4.0 and earlier.

        Like I say. The ability to execute subqueries is not something you can *turn off* in you configuration.
        If you are in fact using version 5.0, and you are getting this error, there must be something wrong with the software. Perhaps you installed 5.0 over an installation of 4.0 and they somehow got fused together?

        Try executing this query and post the exact output here.
        [code=mysql]SELECT version();[/code]

        Comment

        • ddtpmyra
          Contributor
          • Jun 2008
          • 333

          #19
          all along i thought I have version 5.0 but its '4.0.26a' actually and Im using MSQL Query Browser version 5.0

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #20
            Ahh that would explain it.

            Then the solution is simple. Upgrade to MySQL 5.1 :]

            Comment

            • ddtpmyra
              Contributor
              • Jun 2008
              • 333

              #21
              Whew! Do you know any article how to do it step by step when you have actual data stored already on lower version?

              thanks!

              Comment

              • Atli
                Recognized Expert Expert
                • Nov 2006
                • 5062

                #22
                Well, you should start (as always) by backing everything up.
                You could use mysqldump to help you with that.

                Then you should read this page carefully. It lists things you need to know before updating.

                I would recommend trying this on a test server first. Dump your data to a .sql file (using mysqldump), set up a MySQL 5.1 server somewhere it won't be able to damage anything and try importing you data. Then run the mysql_upgrade tool, just to be safe.

                If everything works, repeat the process on your production server.
                Just be sure you back everything up before you do that, in case something goes wrong :]

                Comment

                • ddtpmyra
                  Contributor
                  • Jun 2008
                  • 333

                  #23
                  Thanks for your help

                  Comment

                  Working...