Hai folks
Table candiates
cid | agency_code
+++++++++
1 | 3
2 | 3
3 | 2
4 | 1
5 | 3
6 | 4
7 | 4
8 | 1
Table approvals
cid
++++++++++
4
5
8
i want to list
* all the candiates belongs to agency code 3 and not found in approval tables.
the result should beCode:$$agency_code='3' $query="SELECT candidates.* from candidates, approvals" . " WHERE (candidates.cid <> approvals.cid) AND candidates.agency_code='$agency_code'";
1| 3
2| 3
but i get strange result.
1|3
1|3
1|3
2|3
2|3
2|3
5|3
5|3
5|3
somthing like that



Reply With Quote






Bookmarks