MySQL Create Table HELP
#3

For some reason your strcat() wasn't working properly. I couldn't quite work out as to why so I replaced it with mysql_format. This is a very messy way of doing it, but it worked for me.

PHP код:
public OnGameModeInit() 

    print(
"\n----------------------------------"); 
    print(
"    Gamemode Awyobilia Giorgi Medzvelias Mier  "); 
    print(
"         Ar Daargviot Uflebebi      "); 
    print(
"       Damxmare: James Blackwood [ 3R3Kl3 ]"); 
    print(
"----------------------------------\n"); 
    
Connection mysql_connect(HostUserDBPassword); 
    new 
querystr1[1000], querystr2[1000], query[2000]; 
    
querystr1 "CREATE TABLE IF NOT EXISTS `account`(`ID`int AUTO_INCREMENT PRIMARY KEY, `Name` varchar(24) NOT NULL, `Password` varchar(129) NOT NULL, `Email` varchar(129) NOT NULL, `Admin` int(11) NOT NULL, `Sex` int(11) NOT NULL, `Age` int(11) NOT NULL, `Level` int(11) NOT NULL, `Money` int(11) NOT NULL, `Skin` int(11) NOT NULL,"
    
querystr2 "`pCar` int(11) NOT NULL,`pSaxlid` int(11) NOT NULL,`pInterieri` int(11) NOT NULL,`pBankfuli` int(11) NOT NULL,`pBorbali` int(11) NOT NULL,`pSpoileri` int(11) NOT NULL,`pBamperi2` int(11) NOT NULL,`pPaintjobi` int(11) NOT NULL,`pHydrawlic` int(11) NOT NULL)";
    
mysql_format(Connectionquerysizeof(query), "%s %s"querystr1querystr2);
    
mysql_query(Connectionquery); 
    
mysql_query(Connection"CREATE TABLE IF NOT EXISTS `Manqanebi`(`vID`int AUTO_INCREMENT PRIMARY KEY, `Mflobeli` varchar(24) NOT NULL, `vModel` varchar(24) NOT NULL, `vFuel` int(11) NOT NULL, `PosX` int(11) NOT NULL, `PosY` int(11) NOT NULL, `PosZ` int(11) NOT NULL, `PosC` int(11) NOT NULL)"false); 
    if(
mysql_errno(Connection) != 0
    { 
        print(
"Ver Vukavshirdebit SQL-s"); 
        }else{ 
        print(
"Warmatebit Davukavshirdit SQL-s"); 
    } 
    
SetGameModeText(""Mode""); 
    
SendRconCommand("hostname "Saxeli_Serveris""); 
    
LoadTextDraw(); 
    return 
1

Reply


Messages In This Thread
MySQL Create Table HELP - by Pearson - 14.07.2016, 01:58
Re: MySQL Create Table HELP - by Pearson - 14.07.2016, 02:04
Re: MySQL Create Table HELP - by Zoneo - 14.07.2016, 02:39
Re: MySQL Create Table HELP - by Vince - 14.07.2016, 08:33
Re: MySQL Create Table HELP - by Mugala - 19.11.2018, 03:18

Forum Jump:


Users browsing this thread: 2 Guest(s)