enzoDs Posted September 3, 2019 Share Posted September 3, 2019 Hi, I need to run a SQL Query from the client side and I can't do it. I don't know what else to explain, basically I need the client to execute what is in the spoiler and return the value on the client side (Google translate) local players = executeSQLQuery("SELECT id, name FROM players WHERE money > ?", tonumber(amount)) Link to comment
Addlibs Posted September 3, 2019 Share Posted September 3, 2019 The client itself doesn't and shouldn't have access to the SQL database. If you need to run an SQL command upon the request of a client, do so by having the client triggerServerEvent and the server executeSQLQuery. Do not let the client choose what query to run. The server should always build the query and look out for and prevent possibilities of SQL injection (e.g. a client asking the server to remove the whole database - big no-no). Link to comment
Moderators IIYAMA Posted September 3, 2019 Moderators Share Posted September 3, 2019 8 hours ago, enzoDs said: return the value on the client side Can't you do the samething, as in this topic? 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