Solved

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

Posted on 2013-05-11
6
865 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
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

713 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