當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。