| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Member Join Date: Oct 2005
Posts: 28
![]() | |
| |
| | #3 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | if you show us the sql you are currently using it should be possible without too much hassle. Also as monaco asks what is the database engine you are using.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | #4 (permalink) |
| Traveller Join Date: Mar 2007 Location: Yet another city
Posts: 1,419
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | a tabular report of totals for month and day for all users? i think something like: select tablea.userid, tablea.username, thismonth.monthtotal, thisday.daytotal from table tablea inner join ( select sum(fieldA) as monthtotal, userid from table tableb where datefield > 2/1/2008 and datefield < 2/28/08 group by userid ) thismonth on thismonth.userid = tablea.userid inner join ( select sum(fieldA) as daytotal, userid from table tablec where datefield = CURDATE() group by userid ) thisday on thisday.userid = tablea.userid
__________________ NameCooler.com |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |