I have a table with 3 columns PrjId, prjname and station. Here is my table example:
PrjId prjname station
1 test1 s1
1 test1 s2
1 test1 s3
I want to fetch projects from project_detail table into a dropdown. Here is my SQL query
select * from project_detail where prjname <> '' and PrjId is not null;
The issue is instead of one test1 project all 3 test1 are displayed in dropdown. I know I have to put some condition but I am not understanding how to do it. Pease help.