SA-MP Forums Archive
MySql problem! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySql problem! (/showthread.php?tid=524930)



MySql problem! - dieuhanhphuc - 09.07.2014

PHP код:
if(dialogid == REGISTER)
{
    if(!
response) return Kick(playerid);
    new 
query[300];
    
cache_insert_id();
    
mysql_format(OCPquerysizeof(query), "INSERT INTO `account` (`Name`, `Password`) VALUES ('%s', '%s')"GLN(playerid), inputtext);
    
SendClientMessage(playerid, -1"Sucessful.");
}
stock GLN(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,name,sizeof(name));
    return 
name;

The code doesn't have any problem but it still can't Insert the new account to my Database, someone pls help me!


Re: MySql problem! - kamiliuxliuxliux - 09.07.2014

Do mysql_query(OCP,query) line


Re: MySql problem! - ikey07 - 09.07.2014

Set fields default values in the database, and check mysql log.