Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Adding a gift reward to the CMS [Help REQUEST]
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="MayoMayn" data-source="post: 392808" data-attributes="member: 71840"><p>[PHP] DATE(`daily_time`) <= CURRENT_DATE - INTERVAL 23 HOUR [/PHP]</p><p>If you want it to be daily [USER=72035]@Sly[/USER], and reset at a new day (00:00) this is how I did it, the reason I made it 23 hours and not 24 hours, depends on the local time of the user and the mysql.</p><p>And another thing, [USER=51728]@JMS[/USER], there's no reason at all to use "<strong>*</strong>" when the only think you're fetching from the table is "<strong>id</strong>", which will just make the query slower. You don't really need to brag about anything, if you don't even know such simple details.</p><p>PM me [USER=72035]@Sly[/USER], and I will provide a full daily reward function with sql, with different items based on the probability of receiving them, you will just have to convert it from <strong>PDO</strong> to <strong>mysql_</strong></p><p>[SPOILER]</p><p><a href="http://imgur.com/a/KuWgU" target="_blank">http://imgur.com/a/KuWgU</a></p><p>[/SPOILER]</p></blockquote><p></p>
[QUOTE="MayoMayn, post: 392808, member: 71840"] [PHP] DATE(`daily_time`) <= CURRENT_DATE - INTERVAL 23 HOUR [/PHP] If you want it to be daily [USER=72035]@Sly[/USER], and reset at a new day (00:00) this is how I did it, the reason I made it 23 hours and not 24 hours, depends on the local time of the user and the mysql. And another thing, [USER=51728]@JMS[/USER], there's no reason at all to use "[B]*[/B]" when the only think you're fetching from the table is "[B]id[/B]", which will just make the query slower. You don't really need to brag about anything, if you don't even know such simple details. PM me [USER=72035]@Sly[/USER], and I will provide a full daily reward function with sql, with different items based on the probability of receiving them, you will just have to convert it from [B]PDO[/B] to [B]mysql_[/B] [SPOILER] [URL]http://imgur.com/a/KuWgU[/URL] [/SPOILER] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Adding a gift reward to the CMS [Help REQUEST]
Top