Query user info
Posted: 19 Aug 2008, 00:46
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...