GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Real quick sql querie question... (https://gfy.com/showthread.php?t=1350913)

Publisher Bucks 12-23-2021 09:51 PM

Real quick sql querie question...
 
Is there a way to display SQL querie results on a php page based on the date?

For example, lets say on the 1st it shows 5 results, then on the 10th it shows 10 results, the 15th 15 results... All from the same querie without having to rewrite it and use phodate to display seperate pages?

If so, what is that function called please so I can do some research and playing about with it.

Thanks.

Merry Happy HoliChrismaKwanza to all too :thumbsup

sarettah 12-23-2021 10:17 PM

You can use the php date() function to get the day of the month and then use that as your limit.

$limit=date('j',time());
$sql="select * from tablename limit " . $limit;

.

Publisher Bucks 12-23-2021 10:23 PM

Quote:

Originally Posted by sarettah (Post 22946895)
You can use the php date() function to get the day of the month and then use that as your limit.

$limit=date('j',time());
$sql="select * from tablename limit " . $limit;

.

Oh, interesting, I figured it'd actually be a lot more involved than that :1orglaugh

Much appreciated, hope you're well :thumbsup


All times are GMT -7. The time now is 03:16 PM.

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