myonlake Posted September 24, 2013 Share Posted September 24, 2013 Hey, I have been using a few separate MySQL resources before to make SQL querying easy for myself. However, after taking a glance at the database functions I found that there are three functions that do nearly the same thing. dbExec - SQL queries without a result dbQuery - SQL queries with a result executeSQLQuery - SQL queries with a result I have so far been using the db* functions, but I want to switch over to executeSQLQuery because it has a simple result without the need to for-loop everything. Is this a good idea? I heard some time ago that executeSQLQuery is not recommended/supported anymore, but Wiki shows otherwise. Should I stick with db* or switch over? I am using MySQL by the way. Link to comment
Skurken Posted September 24, 2013 Share Posted September 24, 2013 Isn't executeSQLQuery SQLite only? I've played with both db* functions a bit. dbQuery and executeSQLQuery both return a table, so I don't see how executeSQLQuery would be different. Link to comment
myonlake Posted September 25, 2013 Author Share Posted September 25, 2013 Isn't executeSQLQuery SQLite only? I've played with both db* functions a bit.dbQuery and executeSQLQuery both return a table, so I don't see how executeSQLQuery would be different. After playing around with executeSQLQuery, it seems that it didn't even want to work with me. I suppose I was using it wrong or it is for SQLite. And yes, I wasn't paying attention at first, they both do return a table so it's no different Decided to switch back to the db* functions. Well, thanks anyways Link to comment
TheHeadHunter Posted September 25, 2013 Share Posted September 25, 2013 I believe the executeSQL* function are for the database that comes with the MTA server ( registry.db ) and is, as you might expect, SQLite only. db* functions can be used for databases other than registry.db ( dbConnect is used for that ). At least that's how I remember it being... Link to comment
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