Client List
$sql_select_client_query = "SELECT * FROM `clients` ORDER BY `id` DESC";
$sql_select_client_result = mysql_query($sql_select_client_query);
$i = 1;
while($row = mysql_fetch_array($sql_select_client_result))
{
$project_id = "";
if($i==4){
$i = 1;
}
$client_id = $row["id"];
$client_name = $row["client_name"];
$client_logo = $row["client_logo"];
if($client_logo!=""){
$sql_check_number_of_projects_query = "SELECT * FROM `projects` WHERE `project_client_id`='$client_id'";
$sql_check_number_of_projects_result = mysql_query($sql_check_number_of_projects_query);
$sql_check_number_of_projects_count = mysql_num_rows($sql_check_number_of_projects_result);
if($sql_check_number_of_projects_count>0){
$sql_select_work_for_client_query = "SELECT * FROM `projects` WHERE `project_client_id`='$client_id' AND `displayable`='Yes' ORDER BY `id` DESC LIMIT 1";
$sql_select_work_for_client_result = mysql_query($sql_select_work_for_client_query);
while($row = mysql_fetch_array($sql_select_work_for_client_result))
{
$project_id = $row["id"];
}
}else{
$sql_select_work_for_client_query = "SELECT * FROM `projects` WHERE `project_contractor_id`='$client_id' AND `displayable`='Yes' ORDER BY `id` DESC LIMIT 1";
$sql_select_work_for_client_result = mysql_query($sql_select_work_for_client_query);
while($row = mysql_fetch_array($sql_select_work_for_client_result))
{
$project_id = $row["id"];
}
}
if($i==3){
echo"
";
}else{
echo"
";
}
if($project_id!=""){
echo"
";
}else{
echo"
";
}
echo"
";
$i++;
}
}
?>
featured_work('All', '10', '0', '0');
?>