Jump to content
  • 0

Create List out of DB


Vincent

Question


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Hi,

how can i create a list as Message out of Database. Like a Toplist.

is there any standart script for those jobs?

 

The DB strucur is: [char_id] [Points]

Edited by Thor v2
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  254
  • Reputation:   72
  • Joined:  07/10/13
  • Last Seen:  

1. Delete the arrays you will use for query_sql( ).

2. Use query_sql( ) to get the datasets (order the result by `Points`).

3. Loop through the datasets using for( ).

4. For each dataset, select the character names from the `char` table and display both the names and the points.

This will only work if you have less than 128 entries in the top list.

See this suggestion if you want more than 128 entries.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Thanks i will try if i get it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...