I have this select:
$sql="SELECT DISTINCT toursArtist,toursDate,toursCity,toursState,toursVenue FROM tours WHERE $show LIKE ('%".addslashes($search)."%') ORDER BY toursDate LIMIT $offset, $sqllimit";
The distinct is in place because there are often people entering the same info twice by mistake, so this eliminates the duplicates from my results.
Below I use this code to echo my fields:
$id = $row["toursID"];
$artist = $row["toursArtist"];
$date = $row["toursDate"];
$city = $row["toursCity"];
$state = $row["toursState"];
$venue = $row["toursVenue"];
echo "blah blah blah $id $artist and so on, you see?";
Problem is, by using the Distinct code, my $id field will not work. I cannot add it to the distinct as then of course the function will no work as the toursID field is an auto field to identify each row uniquely.
So how do I get around this??? I must be able to call the $id in the echo!
Thanks