Solved

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

Posted on 2013-05-11
6
894 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

635 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