17.11.2016, 10:51
i have query like this one

and my code is this one
but i get this one instead of the date's index....

and my code is this one
Код:
//doublescore weekend
{
new dsquery[40], dsyear, dsmonth, dsday;
getdate(dsyear, dsmonth, dsday);
mysql_format(mysql,dsquery,sizeof(dsquery),"SELECT WEEKDAY('%d-%d-%d')",dsyear,dsmonth,dsday);
mysql_query(mysql,dsquery);
new dscheck = cache_get_row_int(0,0);
if(dscheck == 5 && dscheck == 6)
{
dsweekend = 1;
}
else dsweekend = 0;
printf("[DOUBLESCORE_WEEKEND]Date : %d-%d-%d : Weekday: %s : Active : ",dsyear,dsmonth,dsday,dscheck,dsweekend);
}
Код:
[17/11/2016 06:30:33] [MYSQL] Connection with the database: SUCCESS!
[17/11/2016 06:30:33] -----------------------------------------------------
[17/11/2016 06:30:33] [DOUBLESCORE_WEEKEND]Date : 2016-11-17 : Weekday: аSELECT WEEKDAY('2016-11-17') : Active :
[17/11/2016 06:30:33]
[17/11/2016 06:30:33] BFScript is loaded. By Slawi, Mr.Moon, Kiets & DetoNater.
[17/11/2016 06:30:33]
[17/11/2016 06:30:33] Number of vehicle models: 56

