|  | 
| 
			 
			#1  
			
			
			
			
			
		 | ||||
| 
 | ||||
|  Database Query: COUNT(*) 
			
			How can I perform:  SELECT COUNT(*) FROM vote_voterswith $mysidia->db->select()?? edit (answer): PHP Code: 
			Then perhaps, as above, but a count of all rows in vote_voters between two variable dates, such as: SELECT COUNT(*) FROM vote_voters WHERE date >= '{$date1}' and date < '{$date2}'(Mental notes to self: format needs to be 2015-01-15, that is, (Y-m-d).) edit (answer): PHP Code: 
			Next, both of the last two above (all time and between certain dates), but also taking into account: WHERE username = '{$user}'(Mental notes to self, $user = $mysidia->input->get("user") on profile pages.) edit (answer): PHP Code: 
			Would it be possible to pull a list of the names of the top 10 users (this week/month)?? (Though this is problematic as uid is not currently being stored in vote_voters, so I can't use it as a secondary order checker, and alphabetic just won't cut it, as older members should have precedence in score charts). edit (answered by HoF over aim, huge thanks!) PHP Code: 
			Can I also get the most common pet type in owned_adoptables? edit (answered by HoF over aim): see below In the end I will want to set nine variables: 
 Later I may extend this data to 'factions', to create a competitive atmosphere, not just against other players, but other faction groups. The most active factions getting rewarded regularly, of course.   
				__________________ Please do not contact me directly outside of Mysidia. I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 01-19-2015 at 03:24 AM. | 
| Tags | 
| database, database queries, mysql, stats | 
| 
 | 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| CSS Query .-. | ChibiMaestro | Templates and Themes | 2 | 12-08-2012 05:51 AM | 
| Delete query deletes from all usesrs | SilverDragonTears | Questions and Supports | 8 | 05-14-2012 07:49 PM | 
| Having a problem running a query | !Alive | Questions and Supports | 8 | 03-11-2012 02:39 PM | 
| Reward Message Character Count - answered, thank you! | we are halloween | Questions and Supports | 3 | 09-26-2010 07:43 AM | 
| Join query for optimization? | Arianna | Questions and Supports | 2 | 04-09-2010 12:32 PM | 
| What's New? | What's Hot? | What's Popular? |