Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678353
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:37:37+00:00 2026-05-31T17:37:37+00:00

March 2012: 9 27 28 29 1 2 3 4 10 5 6 7

  • 0

March 2012:

9   27  28  29  1   2   3   4
10  5   6   7   8   9   10  11
11  12  13  14  15  16  17  18
12  19  20  21  22  23  24  25
13  26  27  28  29  30  31

First column this is number week of year – in php date(“W”);
I have in database MySQL:

id | count | date
1  | 2     | 2012-02-28 11:11:11 // 9 week
2  | 4     | 2012-02-29 11:11:11 // 9 week
3  | 5     | 2012-03-01 11:11:11 // 9 week
4  | 2     | 2012-03-03 11:11:11 // 9 week
5  | 5     | 2012-03-05 11:11:11 // 10 week
6  | 3     | 2012-03-07 11:11:11 // 10 week
7  | 6     | 2012-03-08 11:11:11 // 10 week
8  | 2     | 2012-03-12 11:11:11 // 11 week
9  | 6     | 2012-03-13 11:11:11 // 11 week
10 | 5     | 2012-03-16 11:11:11 // 11 week
11 | 1     | 2012-03-16 11:11:11 // 11 week
12 | 9     | 2012-03-16 11:11:11 // 11 week

How can i SUM with Symfony 1.4 and Doctrine 1.2 for all week?

In this example should show me:

week | count
9    | 13
10   | 14
11   | 23

How should look query with Doctrine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:37:38+00:00Added an answer on May 31, 2026 at 5:37 pm

    According to that http://sqlfiddle.com/#!2/9701b/6, I will perfom this query:

    $query = Doctrine_Query::create()
       ->select("sum(s.count), date_format(s.date, '%v') as date_formatted")
       ->from('SomeTable s')
       ->groupBy('date_formatted');
    

    I used as date_formatted in the select clause because Doctrine doesn’t understand the date_format in the groupBy method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have date of this format March 3, 2011 in database and I need
I have a boost::posix_time::ptime that points to March 31st 2010 like this: ptime p(date(2010,
(This is my first try with php) I have a very basic register page.
I want to display date like this in my website Wednesday, March 03, 2010
I have php mysql calneder for my hotel room booking system. but it shows
This short piece of code displays the date of the first day of the
I have a MySql table named 'comments' : id | date | movie_id |
I have this code in my view. $(#Effective Date).datepicker({ showOn: button, buttonText: ... });
I use a proprietary date format that looks like this: var TheUserDate = 3.11.2012.4.3;
This may be old news but back in March 2009, this article, Model-View-ViewModel In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.