GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Webmaster Q & Fuckin' A (https://gfy.com/forumdisplay.php?f=27)
-   -   Autogallery SQL order by date and weight? (https://gfy.com/showthread.php?t=656309)

MonkeyG 09-17-2006 02:23 AM

Autogallery SQL order by date and weight?
 
Im trying to gte a handle on my template scripts.

I want to display sections with today, yesterday and 2 days ago.

This is my current template

<%GALLERIES
HASTHUMB 1
TYPE Submitted
CATEGORY pictures
AMOUNT 30
PAGEDUPES False
GETNEW True
ORDER Weight DESC
REORDER Weight DESC
HTML Thumb

INSERT
{
LOCATION +1
HTML </tr><tr>
}
%>

Is the following correct for today and yesterdays section, for galleries sorted by date and weight??

<%GALLERIES
HASTHUMB 1
TYPE Submitted
CATEGORY pictures
AMOUNT 30
PAGEDUPES False
GETNEW False
ORDER Display_Date 2006-09-17, Weight DESC
REORDER Display_Date 2006-09-17, Weight DESC
HTML Thumb

INSERT
{
LOCATION +1
HTML </tr><tr>
}
%>

<%GALLERIES
HASTHUMB 1
TYPE Submitted
CATEGORY pictures
AMOUNT 30
PAGEDUPES False
GETNEW False
ORDER Display_Date 2006-09-16, Weight DESC
REORDER Display_Date 2006-09-16, Weight DESC
HTML Thumb

INSERT
{
LOCATION +1
HTML </tr><tr>
}
%>

Sorry, im just unsure about how to get the ORDER to work with two functions.

Thanks for your help!

MonkeyG 09-17-2006 05:18 AM

fiddled around and the wonders of trial and error...

This probably not the most elegant solution but it works... here it is for anyone searching gfy for a solution in the future.

<%GALLERIES
AMOUNT 25
WHERE Category='pictures' AND Approve_Date = '2006-09-16'
REWHERE Category='pictures' AND Approve_Date = '2006-09-16'
ORDER Weight DESC
REORDER Weight DESC
HTML Thumb

INSERT
{
LOCATION +1
HTML </tr><tr>
}
%>

fusionx 09-17-2006 04:17 PM

Look at the AGE, MAXAGE and MINAGE directives


All times are GMT -7. The time now is 09:26 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123