<?php
global $IN;
$a = "2013_pros_list";
$b = "2013_pros";
$c = "ska_points_tour_2013";
$key = "team_id";
$type = "pro";
$query = "SELECT * FROM $a
LEFT JOIN $c ON ($c.$key=$a.$key)
LEFT JOIN $b ON ($b.$key=$a.$key)
ORDER BY `total` DESC LIMIT 75";
$exclude_list = array("LADIES","JUNIOR","SENIOR");
if(!in_array($str, $exclude_list)){
$place = "";
$result = mysql_query($query) or die(mysql_error());
while($row = mysql_fetch_array($result)){
$place++;
$str = $row['type'];
The function of the page is to pull data from a sql DB in which the table has Fishing Team Names with a unique Number associated with the team.
The catch:
Each team has a unique number attached to it.
This team can fish 4 different categories:
LADIES, PRO, SENIOR, and JUNIOR.
We need to show just the PRO on this page.
So lets say Big Joe Fisher is the Team Name and the number is 1234-0, and Big Joe Fisher fishes as a Senior in on event and a Pro in another we seam to get him showing up two times on the page even though the $exclude_list = array is asking to "exclude" Seniors. (and Ladies and Junior types) from the database "ska_points_tour_2013"
Although the "key" is the "team_id" we are looking to just pull all the "PRO" "type" and exclude the other categories.
Can you dig it?
Thanks for the help.