Пользователь
		- Регистрация
 - 28 Мар 2022
 
- Сообщения
 - 159
 
- Автор темы
 - #1
 
Решил сделал себе вывод инфы в диалг с бд admin log сделал с примера и тут косяк
сделал команду а потом паблик и нечего не получилось выдает ошибки в mysql log сделал вот так
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
[17:17:13 09/03/22] [ERROR] CMySQLQuery::Execute[Alogs] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `type`, `name`, `reason`, `date` != 0 ORDER BY `admin_logs`.`admin_name`, `type' at line 1 (Query: "SELECT * FROM `admin_logs` WHERE `admin_name`, `type`, `name`, `reason`, `date` != 0 ORDER BY `admin_logs`.`admin_name`, `type`, `name`, `reason`, `date` DESC LIMIT 15")
			
			сделал команду а потом паблик и нечего не получилось выдает ошибки в mysql log сделал вот так
			
				C++:
			
		
		
		CMD:aaa(playerid, params[])
{
    mysql_tquery(connects, "SELECT * FROM `admin_logs` WHERE `admin_name`, `type`, `name`, `reason`, `date` != 0 ORDER BY `admin_logs`.`admin_name`, `type`, `name`, `reason`, `date` DESC LIMIT 15", "Alogs", "i", playerid);
    return true;
}
forward Alogs(playerid);
public Alogs(playerid)
{
    new rows, fields;
    cache_get_data(rows, fields);
    new year, month,day, hour,minuite,second;
    getdate(year, month, day);
    gettime(hour,minuite,second);
    if(rows) {
        new dialog[1200], str[700];
        stringer[0] = EOS;
        dialog = "админ\tпричина\tигрок\tпричина\tдата\n";
        for(new i = 0; i < rows; i++) {
            new admin_name[25], type[128],name[25],reason[30],date[20];
            cache_get_field_content(0, "admin_name", admin_name, connects, 50);
            cache_get_field_content(0, "type", type, connects, 128);
            cache_get_field_content(0, "name", name, connects, 25);
            cache_get_field_content(0, "reason", reason, connects, 30);
            cache_get_field_content(0, "date", date, connects, 20);
            format(str, sizeof(str), "%s %s %s %s %02d/%02d/%d %02d:%02d:%02d\n",PlayerInfo[playerid][pNames],type,name,reason,day,month,year,hour,minuite,second);
            strcat(dialog, str);
        }
        SPD(playerid, 0000, 0, "test", dialog, "Закрыть", "");
    }
    return 1;
}
	[17:17:13 09/03/22] [ERROR] CMySQLQuery::Execute[Alogs] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `type`, `name`, `reason`, `date` != 0 ORDER BY `admin_logs`.`admin_name`, `type' at line 1 (Query: "SELECT * FROM `admin_logs` WHERE `admin_name`, `type`, `name`, `reason`, `date` != 0 ORDER BY `admin_logs`.`admin_name`, `type`, `name`, `reason`, `date` DESC LIMIT 15")