#๐Ÿ”’ Random id for citizen system(can anyone advice me smth pls ,like is there have any bug in my code?

14 messages ยท Page 1 of 1 (latest)

exotic copperBOT
#

Please react with โœ… to upload your file(s) to our paste bin, which is more accessible for some users.

#

@mystic sun

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

mystic sun
night plinth
#

Are you getting an error? Unexpected behavior?

mystic sun
night plinth
mystic sun
night plinth
#

I would personally move the the SQL execute calls into dedicated functions with good names. Mixing the database calls with a bunch of other logic like you're doing in luu_chinh_sua_user makes the functions larger, harder to read, and with less-defined purposes. I'd do the database interactions in one function, then call that function from functions like luu_chinh_sua_user. That prevents you from mixing multiple languages in each function, and also means if you switch to a different database at some point and need to adapt the SQL, all the database code is in one central spot instead of scattered all over the codebase.

mystic sun
exotic copperBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.