NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page MySQL Query Help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-14-2006, 07:26 AM THREAD STARTER               #1 (permalink)
Account Suspended
 
Domains4u's Avatar
Join Date: Nov 2005
Location: www.TFFH.net
Posts: 280
Domains4u has a spectacular aura aboutDomains4u has a spectacular aura about
 



MySQL Query Help


Hi there.

Ive got a databse running and an admin panel so i can add data. The data is displayed in a table.

When i add new data the new data ends up at the bottom of the post. Check www.UKGMC.com for an example.

Heres the code im using. How would i change it to display the newest data at the top?

Code:
$query = "SELECT CONCAT(dl_genre) AS genre, (dl_name) AS name, (dl_desc) AS dr, (dl_date) AS cat, (dl_link) AS link 
FROM dl ORDER BY dl_id ASC"; 
$result = @mysql_query ($query);
Domains4u is offline  
Old 02-14-2006, 08:07 AM   #2 (permalink)
NamePros Regular
 
moondog's Avatar
Join Date: Jun 2004
Posts: 587
moondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to allmoondog is a name known to all
 



try:

PHP Code:
$query "SELECT CONCAT(dl_genre) AS genre, (dl_name) AS name, (dl_desc) AS dr, (dl_date) AS cat, (dl_link) AS link 
????: NamePros.com http://www.namepros.com/programming/167429-mysql-query-help.html
FROM dl ORDER BY dl_id DESC"

__________________
Can't wait to be out of this forsaken business. Getting close! :)
moondog is offline  
Old 02-14-2006, 08:31 AM   #3 (permalink)
Account Closed
Join Date: Feb 2006
Posts: 42
imMike is an unknown quantity at this point
 



What he said. Change ASC (ascending order) to DESC (descending order) in your query.
imMike is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Great Scripts for Sale With Resale Rights! Zeeble Scripts For Sale 20 01-04-2006 02:39 AM
MySQL Tips shahid_146 Webmaster Tutorials 4 10-18-2005 01:53 PM
Tutorial: How to Install Apache2 MySQL and PHP on Windows deadserious Webmaster Tutorials 35 09-21-2005 10:46 PM
Tutorial: Getting Started With MySQL (The Basics) deadserious Webmaster Tutorials 3 04-18-2004 02:17 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 02:28 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger