Jump to content

Question

Posted

Problema intalnita (descriere): Vreau sa salveze anumite field cand trece ziua, gen : 23:59 sa faca update.
Ero(area / rile) / warning-(ul / urile): http://imgur.com/395jAsH
Liniile de cod / sursa / script-ul(obligatoriu): 

function ExpireWithDay()
{
	new time1, time2, time3;
	gettime(time1, time2, time3);
	new Cache: Result,
		query[128], rows;
 	if(time1 == 23 && time2 == 55)
    {
		format(query, sizeof(query), "SELECT COUNT(*) as total_rows FROM `users`");
		Result = mysql_query(SQL, query, true);
		rows = cache_get_field_content_int(0, "total_rows", SQL);
		for(new i = 1; i < rows; i++)
  		{
	        ClanIsOwned(i); // Check clan is owned by
	        AccIsPremium(i); // Check Premium Account
			IsAPPCar(i, 1); // Premium Car ID 1
			IsAPPCar(i, 2); // Premium Car ID 2
			IsAPPCar(i, 3); // Premium Car ID 3
			IsDDAcc(i); // Check is buy premium account
			UpdateGiftDay(i); // Update user or not /getbonus
			printf("[ID: %d] Update %d milliseconds times", i, cache_get_query_exec_time(UNIT_MILLISECONDS));
		}
		return 1;
	}
	cache_delete(Result);
	return 0;
}


Imagini / Video (optional): N/A
Ati incercat sa rezolvati singur?: Da.

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.