JeViCo Posted March 30, 2018 Posted March 30, 2018 Hello everyone! I have a question from topic - how can i count entries from sqlite/mysql database? For example i have a table called "houses" and some entries in it like "id", "owner", "price" etc. I need to make house limit (3 per owner). I know that this is possible for simple tables. Is it possible here too?
Moderators IIYAMA Posted March 30, 2018 Moderators Posted March 30, 2018 Use the aggregate COUNT function: https://dev.mysql.com/doc/refman/5.7/en/counting-rows.html Here you have more related functions: https://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html 1 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
JeViCo Posted March 30, 2018 Author Posted March 30, 2018 12 minutes ago, IIYAMA said: Use the aggregate COUNT function: https://dev.mysql.com/doc/refman/5.7/en/counting-rows.html Here you have more related functions: https://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html Thank you! 1
Moderators Pirulax Posted March 30, 2018 Moderators Posted March 30, 2018 @IIYAMA How should be this used?With dbPoll?
Moderators IIYAMA Posted March 30, 2018 Moderators Posted March 30, 2018 dbQuery + dbPoll for sql. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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