Jump to content

Barand

Moderators
  • Posts

    24,344
  • Joined

  • Last visited

  • Days Won

    795

Barand last won the day on April 21

Barand had the most liked content!

About Barand

Profile Information

Recent Profile Visitors

96,023 profile views

Barand's Achievements

Prolific Member

Prolific Member (5/5)

2.1k

Reputation

467

Community Answers

  1. Strange a function that is defined twice should be flagged as "undefined". You have a surfeit of quotes in this line... echo '<select name="avatar" id="Avatar" onChange="changeAvi()"">'; ^
  2. Working with what you've unfortunately got now, when you read through the query results store each record in an array which has a subarray for month values. Covert the start and dates to index values for this array (0 if the start date is earlier than Jan and 11 if the end date is after Dec. Just use that portion of the array to calculate totals and averages.
  3. Now you have all the data you need to do what you wanted to do. For each mark record,j ust include the values for those months that lie within the data range and job done.
  4. How do you know that he started in July? How do you know that Kuldeep Singh (#230) didn't leave at the end August and his average shouldn't be calculated over 8 months? In other words, what is the rule for when to include blank values in the averages and when to ignore them? [edit] BTW, there is no "branch" column the "mark" table
  5. Stop storing spreadsheets in your database. Come back when you have normalized data.
  6. If you work in base 9 rather than base 10 1 + 5 + 7 + 6 = 21
  7. 22 is easy (5 - 1) * 7 - 6 but wouldn't an id card that had an age entry like that look just a lttle suspicious? eg Age : (5 - 1) * 7 - 6 I'll keep trying for 21.
  8. 'til now they have been mathematical so here's one that's purely grammatical Q4 Correctly punctuate this sentence so that it makes sense the two boys had written very similar essays but peter where paul had had had had had had had had had had been preferred by the teacher
  9. Welll done. I knew you'd do it. Hint for others:
  10. Your foreach() loop expects several items and that each will be put into $row as you loop through. But get(cart_item) only returns a single item so when you use foreach() you are looping through its properties Try $row = Session::get("cart_item"); echo <<<ITEM <tr> <td width="70"><center>{$row['ItemCode']}</center></td> <td>{$row['ItemDesc']}</td> <td width="70"><center>{$row['ItemQty']}</center></td> <td width="70"><center>{$row['ItemAmount']}</center></td> <td width="70"><center>{$row['ItemTotalAmount']}</center></td> </tr> ITEM;
  11. Are you saying that if you foreach(Session::get("cart_item") as $row) { print_r($row); } then you get... for each item?
  12. That wasn't thinking outside the box, that was a cop-out. The woodchuck was just slower than the others collecting his twigs. There is a (none-zero) solution.
  13. For anyone else out there, feel free to join in. Meanwhile... Q3 Some animals are gathered in the forest having a midwinter party, all seated around a fire. When the fire starts to die down they all move off to gather more wood. The walrus manages to gather 7 twigs and throw them on the fire, the widgeon throws on 21 twigs, the wombat 11 twigs, the weasel 20 twigs and the wolverine throws on 28 twigs. How much wood would a woodchuck chuck if a woodchuck would chuck wood?
×
×
  • 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.