Jump to content

MySQL and SQL


K4stic

Recommended Posts

Posted

Hello Community

i wonna ask and to you show me how to transfer data of SQL to MySQL

MySQL

dbExec( connection, "INSERT INTO accounts SET username=?, password=?, serial=?", string.lower( user ), sha256( pass ), getPlayerSerial( source )) 

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

Posted

I don't understand what do you want to do.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i make this:

addEventHandler("onResourceStart", resourceRoot, 
function () 
    local playersacc = executeSQLQuery( "SELECT id, name, password, serial FROM accounts",idName, nameName, passwordName, serialName ) 
        for i, playerdata in ipairs(playersacc) do 
            dbExec( connection,"INSERT INTO accounts SET id=?,username=?, password=?, serial=?", playerdata.id, playerdata.name, playerdata.password, playerdata.serial ) 
        end 
    end 
) 

but it say no exist table accounts(and the table accounts is on internal.db)

i wonna transfer account Data's from internal.db(id,username,password,serial) to MySQL

Giving a Fuck? Nope, That isn't in My Skill Set

castie11.png

Posted

That's because executeSQLQuery uses the "registry.db" database.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

You can't really make it, since you can't get the password with scripts, you must convert the table with some program to a mysql table, then import it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...