How to use DISTINCT in my code

I’m have working mysql query which works fine in php but I want to use DISTINCT for ponumber which should be get unique from mysql.

how its possible, my code is this which is working but not showing the Unique records of ponumber which is in csvdata table.

$query_rsRequests = sprintf(“SELECT DISTINCT d.,r.,v.*,s. defDesc as status FROM vnd_requests r inner join req_defs s on r.status=s.defId inner join vnd_sec v on r.addBy=v.userLogin inner join csvdata d on v.userLogin=d.vndid WHERE v.userLogin=d.vndid”);

SELECT DISTINCT does not select distinct field values - it selects distinct ROWS of data from a query. So if one field on any of those four tables is different, you’re going to get a new row of data returned. If you’re looking for a limited dataset, change your query to return less fields of data to limit the chances of uniqueness.