![]() |
search.php - help needed - "getdaily"
PHP Code:
hours and days work? but not minutes... why not? for: search.php?do=getdaily&minutes=15 search.php?do=getdaily&hours=1 search.php?do=getdaily&days=1 days work, hours, work, but minutes don't... any help 15 minutes is pulling up last 6 hours 30 minutes is pulling up last 9 hours 45 minutes is pulling up last 18 hours |
Quote:
|
1 Attachment(s)
in the url...
with code's that look like this (ignore the "month" one) |
well? :)
|
Quote:
|
the attached thumbnail image... showing how i edited the navbar template for the links...
there is more editing done than that, of course... i just took a screenshot of the links |
Quote:
|
i don't understand what you are saying...
do you have aol instant messenger? |
the $days variable isn't defined either, so i don't think it needs to be deined i think the issue is the the TIMENOW() fucntion, he's gotta work out which is for which.
|
yeah... anyone know what to do here? :)
|
For one thing, your equation is wrong. If you were trying to find posts from 2 days and 3 hours ago, which is possible to do, you would end up with
2*3*60*60, which isn't right. What you need to do is to say that if hours, minutes, days, etc. aren't set, they are equal to 0. Then, your math looks like (days *24*60*60) + (hours *60*60) + (minutes*60) + seconds. |
|
It won't work for seconds.
You got lucky with hours, because days is set to 1. The equation for hours is TIMENOW - ($hours *60*60) because there are 60 minutes in an hour and 60 seconds in a minute. Anything bigger than an hour isn't a problem because your math holds true. The problem is with the minutes and seconds. |
so what should i do, amy?
the original string of code for that section looked like this: Code:
// ############################################################################# |
PHP Code:
|
You can't default the variables to 0, that'll make it TIMENOW - 0 when you multiply anything by it. :)
|
Quote:
And, no Saber. That's not what I was saying :) My board is down right now so I can't test this, but I imagine it would look like this: Code:
else Within that elseif block, you should check to see if the hours, minutes and seconds are properly set and initialize them to 0 if not. |
my site's back up, and it seems like it works as I posted it.
|
amykhar is my hero!!!
|
Quote:
|
you were very kind, though, sabre, to help me...
thanks alot... |
hack released: https://vborg.vbsupport.ru/showthread.php?t=73893
|
All times are GMT. The time now is 10:24 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|