Help to covert this PHP to PAWN (MYSQL)
#5

I've tried it:
Код:
forward CleanDB(); public CleanDB() {
    new EXP[4];
    EXP[1] = 20;
    EXP[2] = 100;
    EXP[3] = 500;

    new TEMPO[5];
    TEMPO[1] = 90 * 86400;
    TEMPO[2] = 120 * 86400;
    TEMPO[3] = 300 * 86400;
    TEMPO[4] = 360 * 86400;

    new query[128], num;
    format(query, sizeof(query), "DELETE * FROM `accounts` WHERE `lastlogin` UNIX_TIMESTAMP() >= (`lastlogin` + %d) AND `experience` <= %d" , TEMPO[1], EXP[1]);
    query = mysql_query(query);  // error 035: argument type mismatch (argument 1) && error 033: array must be indexed (variable "query")
    num = mysql_affected_rows(); // error 017: undefined symbol "mysql_affected_rows"
    printf("%d rows was ben deleted because inactivity (90 days / exp 20-)", num);


    query = "DELETE * FROM `accounts` WHERE `lastlogin` UNIX_TIMESTAMP() >= (`lastlogin` + " , TEMPO[2] .") AND `experience` <=" , EXP[2]; // warning 215: expression has no effect && error 001: expected token: ";", but found "." && error 029: invalid expression, assumed zero
    format(query, sizeof(query), "DELETE * FROM `accounts` WHERE `lastlogin` UNIX_TIMESTAMP() >= (`lastlogin` + %d) AND `experience` <= %d" , TEMPO[2], EXP[2]);
    mysql_query(query); // error 035: argument type mismatch (argument 1)
	num = mysql_affected_rows(); // error 017: undefined symbol "mysql_affected_rows"
    printf("%d rows was ben deleted because inactivity (120 days / exp 100-)", num);


    format(query, sizeof(query), "DELETE * FROM `accounts` WHERE `lastlogin` UNIX_TIMESTAMP() >= (`lastlogin` + %d) AND `experience` <= %d" , TEMPO[3], EXP[3]);
    mysql_query(query); // error 035: argument type mismatch (argument 1)
    num = mysql_affected_rows(); // error 017: undefined symbol "mysql_affected_rows"
    printf("%d rows was ben deleted because inactivity (300 days / exp 500-)", num);

    format(query, sizeof(query), "DELETE * FROM `accounts` WHERE `lastlogin` UNIX_TIMESTAMP() >= (`lastlogin` + %d)", TEMPO[4]);
    mysql_query(query); // error 035: argument type mismatch (argument 1)
    num = mysql_affected_rows(); // error 017: undefined symbol "mysql_affected_rows"
    printf("%d rows was ben deleted because inactivity (360 days / exp 501+)", num);
}
But give me some errors
( i putted errors in code after // )
Reply


Messages In This Thread
Help to covert this PHP to PAWN (MYSQL) - by maikons - 14.06.2016, 10:17
Re: Help to covert this PHP to PAWN (MYSQL) - by maikons - 16.06.2016, 03:59
Re: Help to covert this PHP to PAWN (MYSQL) - by iKarim - 16.06.2016, 06:06
Re: Help to covert this PHP to PAWN (MYSQL) - by maikons - 16.06.2016, 08:13
Re: Help to covert this PHP to PAWN (MYSQL) - by maikons - 17.06.2016, 07:11
Re: Help to covert this PHP to PAWN (MYSQL) - by maikons - 23.06.2016, 21:01
Re: Help to covert this PHP to PAWN (MYSQL) - by Arturo226 - 02.07.2016, 18:25

Forum Jump:


Users browsing this thread: 1 Guest(s)