I'm trying to get an one line output for each row my statements iterates to but it outputs like 100 times for every "ticket" it finds. In the current SQL Queue there are only 4 possible tickets which match the criteria.
$ticketIdQuery = pg_query($db, "SELECT ticket.assignee_id, ticket.subject FROM ticket INNER JOIN ticket_assignee_mapping ON ticket.assignee_id=ticket_assignee_mapping.assignee_id WHERE status_id = $firstLevelId");
if($ticketIdQuery)
{
while ($ticketIdQueryFetch = pg_fetch_array($ticketIdQuery))
{
print_r($ticketIdQueryFetch);
}
}
Is there a way to limit the output to one for each row it finds