Jump to content

mysql question


Weii.

Recommended Posts

Posted

I have a question if I add a mysql into looping function will cause server to lag ? I can't realy test it, but if there would be 50 players on server will server lagg?

Code looks someting like that:

function test() 
for index, player in ipairs(getElementsByType("player")) do 
dbQuery(con, "UPDATE ....") 
end 
end 

  • Moderators
Posted

Depends how strong the server is, but yes it will use more memory then normal.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

Thanks IIYAMA!

Besides, why to use "UPDATE" syntax with dbQuery? :P

I just use it for this example, I use exports to my mysql resource...

  • Moderators
Posted

I have no knowledge of mysql, only lua. :P

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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