Convert SQLite to MySQL?
#1

Is there a tutorial or reference around?
I've tried googl'ing but can't seem to find anything.

If anyone could help me convert a script, I would appreciate it. Thanks
Reply
#2

If you know how to use them, write a quick filterscript that will read the data from the SQLite database and will save them in MySQL.

At least this works for me but I use it for SQLite to SQLite.
Reply
#3

I have a gamemode that is in SQLite, I want to convert it to MySQL. I've done a bit with help from people on the forums.
Reply
#4

Quote:
Originally Posted by ]Rafaellos[
View Post
If you know how to use them, write a quick filterscript that will read the data from the SQLite database and will save them in MySQL.

At least this works for me but I use it for SQLite to SQLite.
What do you mean by that?
Reply
#5

I have this:

pawn Code:
public PlayerCharacterCount(playerid)
{
    new DBResult:qresult, count = 0;
    if(IsPlayerConnected(playerid))
    {
        if(MasterAccount[playerid][mLoggedIn])
        {
            format(query, sizeof(query), "SELECT * FROM `Character` WHERE ( `owner_id` = '%d' )", MasterAccount[playerid][mID]);
            qresult = db_query(database, query);
            count = db_num_rows(qresult);
            db_free_result(qresult);
        }
    }
    return count;
}


I converted it to this:
pawn Code:
forward PlayerCharacterCount(playerid);
public PlayerCharacterCount(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        if(MasterAccount[playerid][mLoggedIn])
        {
            new query[64];
            format(query, sizeof(query), "SELECT * FROM `PlayerCharacter` WHERE ( `owner_id` = '%d' )", MasterAccount[playerid][mID]);
            mysql_query(1, query);
            cache_get_field_content(0, "", query);
            count = db_num_rows(qresult);
           
            /*qresult = db_query(database, query);
           
            db_free_result(qresult);*/

        }
    }
    return count;
}
it returns these errors:
pawn Code:
MyProject.pwn(700) : error 017: undefined symbol "count"
MyProject.pwn(700) : error 017: undefined symbol "qresult"
If you could possibly convert it, and explain why, I would be very thankful. Thank you.
Reply
#6

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)