#1

I want to move my server on a MySQL server ... I have users on "scriptfiles", and I want to move on a MySQL
Reply
#2

You can't move users, sorry. But if you have other things saved as an integer, then you can move them.
A friend helped me do that when I was moving my server from Dini to MySQL.
Here's what it looks like:

pawn Код:
stock BTransfer()
{
    for(new i=0; i<MAX_BUSS; i++)
    {
        format(file,sizeof(file),"DynamicBusinesses/%i.ini",i);
        if(dini_Exists(file))
        {
            format(String,sizeof(String),"INSERT INTO business (ID,Name,Owner,Cost,Payout,BusX,BusY,BusZ,World,Interior,Disconnected,BusinessExpire) VALUES (%d,'%s','%s',%d,%d,%f,%f,%f,%d,%d,%d,%d)",
            i,dini_Get(file,"Name"),dini_Get(file,"Owner"),dini_Int(file,"Cost"),dini_Int(file,"Payout"),dini_Float(file,"BusX"),dini_Float(file,"BusY"),dini_Float(file,"BusZ"),dini_Int(file,"World"),dini_Int(file,"Interior"),dini_Int(file,"Disconnected"),dini_Int(file,"BusinessExpire"));
            mysql_query(String);
            print("Businesses transfered to MySQL.");
        }
    }
    return 0;
}
(Yes I keep my backups :P)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)