Jump to content

select different srts of values


fortnox007

Recommended Posts

Hi all i have 2 small questions and maybe someone could help me out.

Say I have a database with a table 'users'.

This table has fields: email, name and year.

 

What I want to do is show at the front-end all users, by selecting them from the table, and arrange them by year in column 1 and show them as individuals in column 2. But here is the thing; if someone selects for instance year 1970 and also someone from 1970 individually, someone will be selected twice. (edit:As a side note the selecting is aimed and emailing the users, that's why selecting someone twice is not good :)

First question is: does anyone know how to remove doubles (maybe even triples if there is a select all button, maybe turn this around and say select only 1 instance of a user).

 

Second question: is this a wise way to let someone select. Right now all users are fetched, and if the table users grows this could be tricky because of the large number of users.

 

If someone could point me in the right direction of thinking I would be very happy, been thinking about this and scalability for quite a while now  ;D

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.