Jump to content

dvacole

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

About dvacole

  • Birthday 02/26/1979

Profile Information

  • Gender
    Male
  • Location
    Sacramento, CA

Contact Methods

  • Yahoo
    lester2864

dvacole's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Great! got it solved! I the query was dying. Thanks for all the help!
  2. Okay, I tried that and I'm getting an invalid supplied argument. This is what I have: $week1 = "SELECT week((date(shift.sdate))),UNIX_TIMESTAMP(date(shift.sdate)), shift.sdate, sum(fast.level1), sum(fast.level2), sum(fast.level3), sum(fast.level4), sum(fast.sales), sum(fast.redeemed) from `fast`, `shift` Where sdate between $startdate and $enddate GROUP BY date(shift.sdate)"; $result=mysql_query($week1); while ($row = mysql_fetch_array($result)) { $prev=$row{'week(date(shift.sdate))'}; if ($row{'week(date(shift.sdate))'}=$prev){; and formating info blah....//this should hopefully format the individul days that match the same week as the other// } else { ; $weektotal="SELECT week((date(shift.sdate))), sum(fast.level1), sum(fast.level2), sum(fast.level3), sum(fast.level4), sum(fast.sales), sum(fast.redeemed) from `fast`, `shift` Where week(sdate) = $weeknumber group by week(sdate) LIMIT 0, 30 "; $weektotallookup=mysql_query($weektotal); while ($test=mysql_fetch_array($weektotallookup));{ // and this should inclide a row that has the sums fot the week. However I'm getting an invalid arugement for $test. I'm totally lost. I've inlcuded a link to the entire code if it would help as a text file. www.dvacole.com/famonthlyreport.txt
  3. Hi I'm fairly noobish with both php and mysql and learning as I go. However I am running into trouble with a report I want to render. My plan is to have a user select the date range that they would like the report to be for and then have then grouped by week for that date range For example let's say the users wants the report for 01/01/2008 to 03/01/2008. I'm just fine pulling up the entire list with an array and displaying the whole range, but I don't know how to have it grouped by week in PHP using a while statement or if that is even the correct way of doing it. I would like the end result to look somthing like this: Title title title date total total date Subtotals date total and so one for the date range.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.