Hi Guys,
I have a query which selects and displays tasks from a tasks table depending on the user_nic (the person who has signed in) in the user table.
The query also calls on a departments in relation to tasks and is also further defined by task_staus equalling 'yes'.
This quesry below selects the correct tasks in relation to the user but displays each correct record three times and then moves to the next record and displays that one three times. How can i round it off to display each record only once.
//selecting tasks assigned to this user_nic which is variable $slct_UID
mysql_select_db($database_illustratestasks, $illustratestasks); //select database
$query_listtasks = "SELECT * FROM tasks //query tables
inner join departments ON departments.DID = tasks.task_department //join departments to task_department
inner join users ON tasks.user_id = '$slct_UID' and tasks.task_status = 'yes' //inner join users on tasks user id
ORDER BY tasks.deadline_date"; //order tasks record display
//display results
$listtasks = mysql_query($query_listtasks, $illustratestasks) or die(mysql_error());
$row_listtasks = mysql_fetch_assoc($listtasks);
$totalRows_listtasks = mysql_num_rows($listtasks);