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
events timetable
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="JayC" data-source="post: 379288" data-attributes="member: 36373"><p>You will want to do either:</p><p></p><p>SELECT * FROM events ORDER BY timestamp ASC</p><p>Which makes the outcome this:</p><p>2</p><p>5</p><p>7</p><p>OR</p><p>SELECT * FROM events ORDER BY timestamp DESC</p><p>Which makes the outcome this:</p><p>7</p><p>5</p><p>2</p><p></p><p>Make sure you add "LIMIT 10" or however many you want at the end of the statement:</p><p>SELECT * FROM events ORDER BY timestamp DESC LIMIT 10</p><p>and if you would like to keep track of all your events that are active/past events then have a column in the events table like "active" and do this:</p><p>active int 11 0 NOT NULL default 1</p><p></p><p>SELECT * FROM events WHERE `active` = '1' ORDER BY timestamp DESC LIMIT 1</p></blockquote><p></p>
[QUOTE="JayC, post: 379288, member: 36373"] You will want to do either: SELECT * FROM events ORDER BY timestamp ASC Which makes the outcome this: 2 5 7 OR SELECT * FROM events ORDER BY timestamp DESC Which makes the outcome this: 7 5 2 Make sure you add "LIMIT 10" or however many you want at the end of the statement: SELECT * FROM events ORDER BY timestamp DESC LIMIT 10 and if you would like to keep track of all your events that are active/past events then have a column in the events table like "active" and do this: active int 11 0 NOT NULL default 1 SELECT * FROM events WHERE `active` = '1' ORDER BY timestamp DESC LIMIT 1 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
events timetable
Top