|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 5,344
|
SQL masters:
What is wrong with this Sub Query:
Code:
SELECT date FROM `records` WHERE STATUS = 'published' AND date = ( select max(date) FROM `records` ) LIMIT = 25; |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Apr 2002
Posts: 2,194
|
i was thinking, is there a way to rewrite that query using 'order by id' or 'date' instead, without using a sub query. That'll be a simpler approach.
like select from `records` where status = 'published' order by id desc limit 0, 25; |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Feb 2005
Location: Budapest, Hungary
Posts: 534
|
select date from records where status='published' order by date desc LIMIT 25;
__________________
|
|
|
|
|
|
#4 | |
|
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
Quote:
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
|
|
|
|
|
|
#5 | |
|
Confirmed User
Industry Role:
Join Date: Dec 2005
Posts: 905
|
Quote:
Your query wants up to 25 record dates for articles published on the same date as the most recent record (published or not).
__________________
Babepedia |
|
|
|
|
|
|
#6 |
|
The Hustler
Join Date: Feb 2005
Posts: 4,993
|
SELECT date
FROM `records` WHERE STATUS = 'published' ORDER BY date DESC LIMIT 25; |
|
|
|