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
[Help/Request] A good statistics page for RevCMS?
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: 337057" data-attributes="member: 36373"><p>I'll show you how to write your own so you don't complain about not getting what you want.</p><p></p><p>3 very easy steps.</p><p></p><p><strong>Step 1: Write the first query</strong></p><p>[CODE]</p><p>mysql_query("SELECT * FROM table");</p><p>* = Grabs All Columns</p><p>You can add things to the end like "WHERE column = *value*" to control your output or SORT BY desc/rand to make the values change order or randomize them</p><p></p><p>So after you get your query written out which should look something like this:</p><p>UberCMS: mysql_query("SELECT * from USERS where USERNAME='".USER_NAME."'");</p><p>RevCMS: mysql_query("SELECT * from USER where USERNAME='".$_SESSION['user']['username']."'");</p><p>[/CODE]</p><p></p><p><strong>Step 2: Grab The Attributes</strong></p><p>[CODE]</p><p>You can never just write a query and then say $query['value'] because you will get a resource ID error. So you grab the attributes of it so you can use it</p><p></p><p>$UseMe = mysql_fetch_assoc($query);</p><p>[/CODE]</p><p></p><p>Great now the easy part</p><p><strong>Step 3: Display/Use the information</strong></p><p>[CODE]Display:</p><p>echo $UseMe['column'];</p><p></p><p>Use:</p><p>'".$UseMe['column']."' --> Use this in another query to grab more info[/CODE]</p><p></p><p>And just to be noted you said you wanted a stats page, and he gave you all of the code for it. Stop being picky we are not here to spoon feed you we are here to HELP. We want to make retros more diverse and unique. We do not want to see the same things over and over.</p><p>Best of Luck!</p></blockquote><p></p>
[QUOTE="JayC, post: 337057, member: 36373"] I'll show you how to write your own so you don't complain about not getting what you want. 3 very easy steps. [B]Step 1: Write the first query[/B] [CODE] mysql_query("SELECT * FROM table"); * = Grabs All Columns You can add things to the end like "WHERE column = *value*" to control your output or SORT BY desc/rand to make the values change order or randomize them So after you get your query written out which should look something like this: UberCMS: mysql_query("SELECT * from USERS where USERNAME='".USER_NAME."'"); RevCMS: mysql_query("SELECT * from USER where USERNAME='".$_SESSION['user']['username']."'"); [/CODE] [B]Step 2: Grab The Attributes[/B] [CODE] You can never just write a query and then say $query['value'] because you will get a resource ID error. So you grab the attributes of it so you can use it $UseMe = mysql_fetch_assoc($query); [/CODE] Great now the easy part [B]Step 3: Display/Use the information[/B] [CODE]Display: echo $UseMe['column']; Use: '".$UseMe['column']."' --> Use this in another query to grab more info[/CODE] And just to be noted you said you wanted a stats page, and he gave you all of the code for it. Stop being picky we are not here to spoon feed you we are here to HELP. We want to make retros more diverse and unique. We do not want to see the same things over and over. Best of Luck! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help/Request] A good statistics page for RevCMS?
Top