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 )) 

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

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.

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...