Solved

Syntax error near “ORDER BY order DESC” in MySQL?

Posted on 2013-05-11
6
873 Views
Last Modified: 2013-05-17
Hi Guys !


I have made a database importation, all was okay !

Then i started a server who added some items in my DB, but now when i want to see which items i have in my database and i click on any table of my DB, i have this error :

SELECT tracking_active FROM . WHERE db_name = 'dol'  AND table_name = 'ability'  ORDER BY version DESC


Please someone has an idea ?

I changed the root password.
0
Comment
Question by:Amoniks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 39157936
Is this SQL Server or MySQL? You've posted in both areas.
0
 
LVL 45

Expert Comment

by:Kent Olsen
ID: 39157950
And, there's no error posted.   :(
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39158012
You might try this:
SELECT tracking_active FROM dol.ability ORDER BY version DESC

In MySQL the FROM clause can use the format DBNAME.TABLENAME
http://dev.mysql.com/doc/refman/5.0/en/select.html

You can also explicitly SELECT the data base by name.  If you have the "dol" data base selected, your query might work this way.
SELECT tracking_active FROM ability ORDER BY version DESC
0
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39159785
And, there's no error posted.   :(
I could be wrong, but I believe it is in the title.  :)

But yes, since this has nothing to do with MS SQL Server, that topic should be dropped.
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 39159878
Please test the query I posted and let us know if it worked.  There are a lot of moving parts to PHP + MySQL.  If you want to show us the PHP code that sets up  your test case (the SSCCE) it might be easier to give assistance.

If you want a good learning resource to help you get started with PHP and MySQL, I can recommend this book.  Now in its fifth printing it has been a permanent part of my professional library since Edition One.  Good examples, very readable and it comes with a downloadable code library you can copy and modify for your own needs.
http://www.amazon.com/dp/0672328887
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39174052
Please see the grading guidelines:
http://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26

Please explain why you did not respond to my last request and why you gave a marked-down grade?  I don't understand what was wrong with my efforts to help you.

Thanks, ~Ray
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question