Query user info
Forum rules
Only post tools related to modding in here, simple.
Only post tools related to modding in here, simple.
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Query user info
Here's a function I made that might be useful for larger MODs to include in a functions file. It is used for querying the users table to get user info. It isn't hard to make your own little thing like this, but you could greatly reduce the amount of code if you use a function to get user info every time instead of writing it all out, plus save your sanity. You can either specify a specific user_id, an array of user_ids, or you can change $where to make it get a certain type of user, eg one that has registered before a certain date. The code does 'WHERE ' . $where, so you don't need to include "WHERE" at the beginning, or a space. I am posting the code here in a zip, because of some stupid errors with the syntax highlighting having a limit to the number of characters, or something like that...
- Attachments
-
- query_user_stats.zip
- (1.29 KiB) Downloaded 129 times
Last edited by harmlessgoat22 on 19 Aug 2008, 13:54, edited 1 time in total.
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Query user info
- we're poor!
-
- Supporter
- Posts: 316
- Joined: 18 Sep 2007, 14:35
- Real name: David
- Contact:
Re: Query user info
That's like, I can't beat my neighbor in an argument, so instead I kill his dog.
-Best English Teacher Ever
Return to “Tools for MOD authors”
Who is online
Users browsing this forum: No registered users and 20 guests