Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-09-2005, 06:19 PM   #1 (permalink)
ez2c
Member
 
Join Date: Aug 2005
Location: Texas
Posts: 40
Default Last Ten Rows Query

Hello,

I'd like to Select the last ten rows entered into my MYSQL database, but I'm not sure how to write the query. I assume it would be based on the number of rows - 10.

Any help is appreciated. Thanks
ez2c is offline   Reply With Quote
Sponsored Links
Old 11-10-2005, 12:55 PM   #2 (permalink)
sandman
Junior Member
 
Join Date: Jul 2005
Posts: 34
Default

Hi,

It may be done like this (of course using your own table and fileds)
$q = 'select field1, field2 from your_table order by field1 desc limit 10;';

cheers
sandman is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:04 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums