SqlLite question
#1

Hello i am creating a command which deletes a players pincode.
The command works like this:

PHP код:
if(!IsPlayerAdmin(playerid)) return ShowPlayerDialog(playeridDIALOG_NONEDIALOG_STYLE_MSGBOX"Oops...""You are not authorized to use this command""OK""");
    if(
strlen(params) <2) return SendClientMessage(playerid, -1"USAGE: /deletepincode [PlayerName]");
    new 
DBResult:CLEAR_RESULT;
    new 
szQuery[128];
    
format(szQuerysizeof(szQuery), "delete from `PINCODES` where `PlayerName` = '%s'"DB_Escape(params));
    
CLEAR_RESULT db_query(PIN_DATABASEszQuery);
    
db_free_result(CLEAR_RESULT); 
My question is, how do i check if the player table exists? so i can return a message like this player does not exist.
Reply


Messages In This Thread
SqlLite question - by jasperschellekens - 17.02.2018, 14:34
Re: SqlLite question - by Mugala - 17.02.2018, 15:33
Re: SqlLite question - by jasperschellekens - 17.02.2018, 15:49
Re: SqlLite question - by Mugala - 17.02.2018, 15:54

Forum Jump:


Users browsing this thread: 1 Guest(s)