EasyUI Forum
May 15, 2024, 11:38:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Help with sum of column that appears in the result rodape  (Read 10079 times)
impperio
Newbie
*
Posts: 11


View Profile Email
« on: November 17, 2012, 11:53:38 AM »



Uploaded with ImageShack.us

I need urgent help sum column rodape tried the example but could not make it work please if someone could post an example I thank,
SOURCE CODE BELOW USED


 <table id="dg" title="IMPERIO SOFTWARE" class="easyui-datagrid" style="width:900px;height:450px"
    url="troca_fazope01.php"   
    toolbar="#toolbar"
    pagination="true"
    rownumbers="true"
    fitColumns="true"
    singleSelect="true"
    pageSize="20"
    showFooter="true">   
      <thead>
         <tr>                   
               
                <th field="bomparB" width="50" sortable="true" align="left">Bom para</th>
            <th field="fantasB" width="50" align="left">PRODUTO</th>
 this column to sum----><th field="salemiB" width="50" align="left">VALOR</th>
            </tr>
      </thead>
   </table>

   
<!-------------------------------------------->
FILE troca_fazope01.php

        session_start();
        $cCodope=$_SESSION["cCodope"];
   $page = isset($_POST['page']) ? intval($_POST['page']) : 1;
   $rows = isset($_POST['rows']) ? intval($_POST['rows']) : 10;
   $offset = ($page-1)*$rows;
   $result = array();      
   include_once('conn.php');
   mysql_query ( "SET NAMES 'utf8'" ); //PARA CARREGAR COM ACENTOS   
   $rs = mysql_query("SELECT count(*) from tab_entche WHERE seqlotB='$cCodope' ") or die (mysql_error ());
   $row = mysql_fetch_row($rs);
   $result["total"] = $row[0];
   $rs = mysql_query("SELECT date_format(bomparB,'%d/%m/%Y') as bomparB,fantasB,salemiB FROM tab_entche WHERE seqlotB='$cCodope' limit $offset,$rows")
   or die (mysql_error ());      
   $items = array();
   while($row = mysql_fetch_object($rs)):
      array_push($items, $row);
   endwhile;
   $result["rows"] = $items;
   echo json_encode($result);

<!---------------------------------------->
Logged
Punkerr
Newbie
*
Posts: 37


View Profile
« Reply #1 on: November 18, 2012, 08:53:09 AM »

Maybe this could help you, look the destroy event: http://jsfiddle.net/YqByE/
Logged
impperio
Newbie
*
Posts: 11


View Profile Email
« Reply #2 on: November 19, 2012, 04:24:42 AM »

Thanks for your message, but no, I need one colcoar rodape if you know something I thank
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!