hey dudes,
i was wondering if there is a way of extracting 1 value from many duplicate entries?
firstly... my table structure - which ive simplified for ease
id | trip | type | date
1 | trip 1 | a | 1 december
2 | trip 1 | b | 1 december
3 | trip 1 | c | 4 december
4 | trip 2 | a | 2 december
5 | trip 2 | b | 2 december
6 | trip 3 | c | 7 december
7 | trip 3 | c | 7 december
8 | trip 3 | c | 8 december
9 | trip 3 | c | 9 december
ok see heres what i want to do...
as you can see there is a date column. i want to generate a select drop down in a form(which i can do) with the applicaple dates for the pre selected trip.
so the dates applicaple to trip 1 are;
1 december and 4 december
the dates applicaple to trip 2 are;
2 december
and the dates applicaple to trip 3 are;
7 december, 8 december and 9 december
is it possible for me to select the applicable dates without printing duplicate dates? its just the php select code i need not the code to generate the drop down - i know that already.
my first thought is to have the table above but create another table with the trip and date without duplicating the date over and over. so if there were three trips 1's leaving on 1st december i would only add that once.
hope thats easy enough to understand!
cheers!
david*