0

so I am making a website and I have a mysql database that stores all the information of users.

This is the structure of my database

CREATE TABLE `profile` (
`userID` INT(25) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`username` VARCHAR(65) NOT NULL ,
`position` VARCHAR(65) NOT NULL ,
`champion` VARCHAR(65) NOT NULL ,
`level` INT(2) NOT NULL,
`division` VARCHAR(65) NOT NULL ,
`name` VARCHAR(65) NOT NULL,
`lolking` VARCHAR(65) NOT NULL,
 UNIQUE (`username`)
);

In my website I want to implement a function that people can search other users based on "division" and "posistion". So I use

SELECT * FROM profiles where `division` ="sth" and `position` = "sth"

I am currently displaying the result in a table since the database is relatively small. However, as the database has more queries, what would be an effective way to show users the result? I am thinking maybe I should build a table with tabs that each tabs show certain number of rows but I do not know how to do it.

1

You can just modify your table in order to provide the following:

  • paging
  • sorting
  • filtering/search
  • number of items to display

enter image description here

image source

As an addition you can introduce tree-table and use some attribute(s) as a part of the tree structure, but I really doubt you need that. So the suggestion is to enhance your current table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.