Search the Community

Showing results for tags 'sql'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 30 results

  1. Hi guys, I'm trying to make a execute query function, this is what I got. But I seem to be doing something wrong. Server sided addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() connection = dbConnect(dbInfo["databaseType"], "dbname="..dbInfo["dbname"]..";host="..dbInfo["host"], dbInfo["username"], dbInfo[password]) if connection then outputDebugString("Connection with database was successfully established.") else outputDebugString("Connection with database couldn't be established.") end end) function execQuery (queryString) local query = dbQuery(connection, tostring(queryString)) if (string.find(queryString, "SELECT")) then local result = dbPoll(query, -1 ) if not result == nil then return result end end dbFree(query) end This I have server sided in another file for testing my db addEventHandler ("onPlayerJoin", getRootElement(), function () local query = execQuery("SELECT username FROM users WHERE username = '"..getPlayerName(source) .."'") if (query) then outputChatBox("found username: "..tostring(query[0])) else outputChatBox("didn't found username, inserting!") execQuery("INSERT INTO users VALUES('', '"..getPlayerName(source).."')") end end ) Also I'm not quite sure how to get the value since I'm returning a table atm. Kind regards P.S. my database looks like this
  2. My problem: = [2016-12-01 19:33:13] MODULE: Unable to initialize mods\deathmatch\modules\libmysql.dll!
  3. Hi guys! When working on a login panel I'll need to hash the password as I guess (since we wouldn't like our password te be plain string) My question tho, Can I choose my encryption type myself? I'm familiar with the MD5 Hash since that's what I'm taught on college. Should I use MD5 which I know or is there a better suggested one? Kind Regards
  4. 2013martin1212

    Help

    Hello i just have a question how i can be get the data from mysql like posX posY etc unction loginReguest(player,username,password) local check = exports.mysql:_QuerySingle("SELECT * FROM users WHERE username = ? " ,username) if check then local checkPass = check.password if (checkPass == password) then logIn(player,getAccount(username),getAccount(password)) triggerClientEvent(player,"showHide", getRootElement()) outputDebugString("User Logged In") end end end addEvent("logIn",true) addEventHandler("logIn",getRootElement(), loginReguest) but my character data is in the different table i want to get the player namemoney and the position but i cant figure out how i cant find any mysql tutorials for this. pls help
  5. WARNING: sql/mysql.lua:47: Access denied @ 'shutdown' Start up of resource sql cancelled by script Stopping sql start: Resource 'sql' start was requested (Start up of resource cancelled by script) I have a few issues with my sql and mysql linking to my database, would appreciate any help