Jump to content

looking to SUM 2 separate columns as each.. not together.

Recommended Posts

let me check.. .. it does now after I restarted httpd.. :)  thanks.. that help me out alot.. lol

Share this post

Link to post
Share on other sites

Hey Barand.. sorry to bug you again.. but how would I get the horizontal lines back in the table? I had them in a style.css.. but this <?=$tdata?> can't seem to be manipulated.

Share this post

Link to post
Share on other sites

Add your styling to the <td>s etc when the $tdata is being built EG

    foreach ($res as $row) {
        $tot_value += $row['value'];
        $tot_balance += $row['balance'];               // accumulate totals as they are fetched
        $tdata .= "<tr><td>{$row['work_order']}</td>
        $tdata .= '<td class="ra">' . toCurrency($row['value']) . '</td>';               // right-align cell
        $tdata .= '<td class="ra">' . toCurrency($row['balance']) . '</td>';             // right-align cell               
        $tdata .= "<td>{$row['status']}</td>
    $tdata .= "<tr><th colspan='3' class='ra'>Totals</th><td class='ra total'>" . toCurrency($tot_value) . '</td><td class="ra total">' . toCurrency($tot_balance) . "</td><td colspan='2'></td></tr>";


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.