troubleshooting Question

Order By Alias two columns

Avatar of Web IT
Web IT asked on
MySQL ServerSQL
9 Comments1 Solution198 ViewsLast Modified:
This query gets two request in one table and two columns (one is alias1Title & alias2Title)

SELECT alias_name1.post_id AS alias1Title,alias_name2.post_id AS alias2Title
FROM wp_postmeta AS alias_name1, wp_postmeta AS alias_name2
WHERE  alias_name1.post_id=alias_name2.post_id
ORDER BY CASE WHEN alias1Title = alias1Title  THEN END DESC

If I want to sort  alias1Title  DESC  and alias2Title  ASC how do I do , I tried various AND statments but get syntax errors.
ASKER CERTIFIED SOLUTION
Web IT

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros