当前位置: 首页>>代码示例>>PHP>>正文


PHP mysql_class::num_rows方法代码示例

本文整理汇总了PHP中mysql_class::num_rows方法的典型用法代码示例。如果您正苦于以下问题:PHP mysql_class::num_rows方法的具体用法?PHP mysql_class::num_rows怎么用?PHP mysql_class::num_rows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mysql_class的用法示例。


在下文中一共展示了mysql_class::num_rows方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: perToEnNums

     $grid->columnFunctions[11] = "loadMande";
     $grid->columnFunctions[4] = "hamed_pdate";
     $grid->columnCallBackFunctions[4] = "hamed_pdateBack";
     $grid->columnAccesses[1] = 0;
     $grid->whereClause = '1=0';
     if (isset($_REQUEST["saztarikh"])) {
         $grid->whereClause = " `typ`=-1 and `tarikh` >= '{$saztarikh} 00:00:00' and `tarikh` <='{$statarikh} 23:59:59'";
     }
     if (isset($_REQUEST["customer_id"]) && (int) $_REQUEST["customer_id"] != -2) {
         $grid->whereClause .= " and `customer_id` = '" . (int) $_REQUEST["customer_id"] . "' ";
     }
     $grid->whereClause .= " order by `tarikh`";
     $grid->pageCount = 30;
     if ($max_tedad == 1) {
         $mysql->ex_sql('select `id` from `customer_daryaft` where' . $grid->whereClause, $tedad);
         $grid->pageCount = $mysql->num_rows($tedad);
     }
     $grid->footer = "<td class=\"showgrid_row_odd\" align=\"left\" colspan=\"7\" >مانده از قبل:</td><td id=\"mande_ghabl\" class=\"showgrid_row_odd\"  align=\"center\">" . perToEnNums(loadMandeh($mande_ghabl_value)) . "</td>";
     $grid->footer .= "</tr><tr><td class=\"showgrid_row_even\"><input name=\"txttedad\"type=\"hidden\" value=\"1\"/>";
     $grid->footer .= "<input class=\"inp1\" type=\"button\" name=\"tedad\" value=\"مشاهده همه\" onclick='document.getElementById(\"set_max_tedad\").value=1;document.getElementById(\"filter\").submit();'  /></td><td colspan='4' class=\"showgrid_row_even\" align='left' >جمع:</td><td class=\"showgrid_row_even\"  id='jam_bed1' align='center'  ></td><td class=\"showgrid_row_even\"  id='jam_bes1' align='center'  ></td><td id=\"tafazol\" align=\"center\" class=\"showgrid_row_even\" ></td>";
     $grid->footer .= "</tr><tr><td class=\"showgrid_row_odd\" align=\"left\" colspan=\"7\" >مانده  کل:</td><td id=\"mande_kol\" class=\"showgrid_row_odd\"  align=\"center\"></td>";
     break;
 case 1:
     $saztarikh = "{$saztarikh} 00:00:00";
     $statarikh = "{$statarikh} 23:59:59";
     $grid->query = "SELECT `customer_id` as `cid`,(select -1*SUM(`mablagh`) from `customer_daryaft` where `customer_id` = `cid` and `typ`=-1 and `tarikh` >= '{$saztarikh}' and `tarikh` <= '{$statarikh}' ) as `bede`,(select SUM(`mablagh`) from `customer_daryaft` where `customer_id` = `cid` and `typ`=1 and `tarikh` >= '{$saztarikh}' and `tarikh` <= '{$statarikh}' ) as `best`,SUM(`mablagh`*`typ`) as `mande`  FROM `customer_daryaft` where `tarikh` >= '{$saztarikh}' and `tarikh` <= '{$statarikh}'  group by `customer_id`";
     $grid->loadQueryField = TRUE;
     for ($i = 0; $i < count($grid->columnHeaders); $i++) {
         $grid->columnHeaders[$i] = null;
     }
     $grid->columnHeaders[0] = "مشتری";
开发者ID:hscomp2002,项目名称:superp,代码行数:31,代码来源:sanad_gozaresh.php


注:本文中的mysql_class::num_rows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。