pa3ck Posted December 8, 2013 Posted December 8, 2013 (edited) REMOVED Edited December 9, 2013 by Guest
Castillo Posted December 8, 2013 Posted December 8, 2013 Where is "connection" defined? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 (edited) REMOVED Edited December 9, 2013 by Guest
TrapLord Studios™ Posted December 8, 2013 Posted December 8, 2013 So it isn't connecting Bro? Visit TrapLord Studios™
Castillo Posted December 8, 2013 Posted December 8, 2013 connection = dbConnect( "mysql", exports.global:getSQLData() ) -- getSQLData in global: function getSQLData() return "dbname=mtasrv;host=127.0.0.1", "mtasrv", " -- ", "share=0" end And this code is on the same lua file as your other script? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 (edited) REMOVED Edited December 9, 2013 by Guest
Castillo Posted December 8, 2013 Posted December 8, 2013 What does 'save' return? also, use dbExec for that sort of queries. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 It returns true but what is the difference between dbQuery and dbExec?
Castillo Posted December 8, 2013 Posted December 8, 2013 dbExec doesn't return anything. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 I changed it to dbExec it works now, but what is the difference between dbExec and dbQuery? Will I need to use dbExec for updating / inserting / getting deatils to / from a table? Thanks a mill.
Castillo Posted December 8, 2013 Posted December 8, 2013 dbQuery is used to obtain data, and dbExec is used for inserting, updating. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 Ah, okay, thanks a mill! EDIT: Do I need to use dbFree after dbExec?
Castillo Posted December 8, 2013 Posted December 8, 2013 No, dbFree is used with dbQuery. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 Okay, got it sir, thank you! EDIT: One more question (facepalm) when do I need to use ``? Or I dont need to use it at all?
Castillo Posted December 8, 2013 Posted December 8, 2013 It's used to escape MySQL reserved words. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
pa3ck Posted December 8, 2013 Author Posted December 8, 2013 Love you man, you helped me a lot, appreciated!
Castillo Posted December 8, 2013 Posted December 8, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now