I have problem with my script
the problem with loop if someone can help me please
Problems:
- I am starting loop perfectly without any problem with first loop only.
- When result = 0 next loop start it gives me -1 -2 -3 etc in first account only.
and the correct way : when next loop start its add +2 in smtp $server_index++; and start from first without sticky in first account and get minues numbers in same account .
$server_index = 0;
while($customer = mysql_fetch_assoc($result)){
//// Start Server Switch
$available_server_limit = $servers[$server_index]["per_day_limit"] - getEmailUsage($servers[$server_index]["id"],date("d/m/Y",time()));
if($available_server_limit==0){
if($server_index==$servers_count-1){
//exit(showError("Sorry! We don't have limit to send more emails"));
mysql_query("UPDATE `smtp_servers` SET `per_day_limit`=`per_day_limit`+2");
$server_index=0;
}else{
$server_index++;
}
}