Now this is the scenario I have voting system in php, so I want to display the candidates based on the organization so after that if the voters log in to the system based on there organization. Just comparison of org_id.
This is my sample mysql query.
$result = mysql_query("SELECT * FROM candidates WHERE position='President' and org_name='IntOrg'");
Now the question is how to loop a query to select and depends on the org_id of candidates.