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


PHP Data::GetRowCount方法代码示例

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


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

示例1:

    <?php 
}
?>
  </select>

  <table>
    <tr>
      <th>Options</th>
      <th>#</th>
      <th>Fraction In.</th>
      <th>Decimal In.</th>
      <th>Millimeters</th>
    </tr>
<?php 
if (Data::GetRowCount('current_material') > 0) {
    for ($n = 0; $n < Data::GetRowCount('current_material'); $n++) {
        ?>
    <tr>
    <td style="text-align: center"><input title="Remove size from this material" type=button value="-" onclick="NotReady();"></td>
    <td><?php 
        echo $n + 1;
        ?>
</td>
    <td><?php 
        echo Data::Get('current_material', 'fraction_in', $n);
        ?>
</td>
    <td><?php 
        echo Data::Get('current_material', 'decimal_in', $n);
        ?>
</td>
开发者ID:donsmoore,项目名称:ballcalc,代码行数:31,代码来源:view_sizes_materials.php

示例2:

  <br><strong>Materials</strong><br>
  <table>
    <tr>
      <th> Options </th>
      <th> # </th>
      <th> Material </th>
      <th> Lbs in3 </th>
      <th> Kg m3 </th>
      <th> balls_per_ounce </th>
      <th> balls_per_pound </th>
      <th> balls_per_kilo </th>
      <th> page_link </th>
      <th style="background-color: white;"></th>
    </tr>
<?php 
for ($n = 0; $n < Data::GetRowCount('all_materials'); $n++) {
    ?>
    <tr>
    <td>
      <input id="id_<?php 
    echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_edit" type=button title="Edit material" value="Edit" onclick="EditMaterial('<?php 
    echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
');" style="display: inline">
    </td>
    <td><?php 
    echo $n + 1;
    ?>
</td>
开发者ID:donsmoore,项目名称:ballcalc,代码行数:31,代码来源:view_materials.php

示例3: Setup

 public function Setup($o)
 {
     $this->o =& $o;
     Debug::Set('Page setup initiated');
     if ($this->o->GetQs('view') == 'sizes' && $this->o->GetQs('action') == 'save') {
         Sql::SetSql(" UPDATE ron_size_list ", 1);
         Sql::SetSql(" SET fraction_in = '" . $this->o->GetQs('fraction_in') . "' , ", 1);
         Sql::SetSql(" decimal_in = '" . $this->o->GetQs('decimal_in') . "' , ", 1);
         Sql::SetSql(" millimeters = '" . $this->o->GetQs('millimeters') . "' , ", 1);
         Sql::SetSql(" one_ball_weight_ounce = '" . $this->o->GetQs('one_ball_weight_ounce') . "' , ", 1);
         Sql::SetSql(" one_ball_weight_gram = '" . $this->o->GetQs('one_ball_weight_gram') . "' ", 1);
         Sql::SetSql(" WHERE id = " . $this->o->GetQs('size_id'), 1);
         Sql::SetSql(" ; ", 1);
         Sql::Execute();
         // hack, lol. Need SetSqlNum and SetSqlStr, then add NULL support
         Sql::SetSql(" UPDATE ron_size_list SET fraction_in = NULL            WHERE fraction_in = '' ; ", 1);
         Sql::SetSql(" UPDATE ron_size_list SET decimal_in = NULL             WHERE decimal_in = '' ; ", 1);
         Sql::SetSql(" UPDATE ron_size_list SET millimeters = NULL            WHERE millimeters = '' ; ", 1);
         Sql::SetSql(" UPDATE ron_size_list SET one_ball_weight_ounce = NULL  WHERE one_ball_weight_ounce = 0 ; ", 1);
         Sql::SetSql(" UPDATE ron_size_list SET one_ball_weight_gram = NULL   WHERE one_ball_weight_gram = 0 ; ", 1);
         Sql::Execute();
         header('location: ?index.php&page=Admin&view=sizes');
     }
     if ($this->o->GetQs('view') == 'sizes_materials' && $this->o->GetQs('action') == 'add' && $this->o->GetQs('material', 0) > 0 && $this->o->GetQs('size', 0) > 0) {
         Sql::SetQueryName('already_there');
         Sql::SetSql(' SELECT * ', 1);
         Sql::SetSql(' FROM ron_materials_by_size MBS ', 1);
         Sql::SetSql(' WHERE MBS.material_id = ' . $this->o->GetQs('material', 0), 1);
         Sql::SetSql(' AND MBS.size_id = ' . $this->o->GetQs('size', 0), 1);
         Sql::SetSql(' ORDER BY 1 ASC ', 1);
         Sql::SetSql(' ; ', 1);
         Sql::Execute();
         if (Data::GetRowCount('already_there') > 0) {
             header('location: ?index.php&page=Admin&view=sizes_materials&material=' . $this->o->GetQs('material', 0));
             // TODO: redirect ALREADY THERE...
         } else {
             Sql::SetSql(' INSERT INTO ron_materials_by_size ( material_id, size_id ) VALUES ( ' . $this->o->GetQs('material', 0) . ' , ' . $this->o->GetQs('size', 0) . ') ; ');
             Sql::Execute();
             header('location: ?index.php&page=Admin&view=sizes_materials&material=' . $this->o->GetQs('material', 0));
             // TODO: redirect ADDED RECORD
         }
     }
     Sql::SetQueryName('all_sizes');
     Sql::ExecuteSql(' SELECT * FROM ron_size_list ORDER BY millimeters ASC ; ');
     Sql::SetQueryName('all_materials');
     Sql::ExecuteSql(' SELECT * FROM ron_material_list ORDER BY id ASC ; ');
     if ($this->o->GetQs('view') == 'materials_sizes') {
         Sql::SetQueryName('current_size');
         Sql::SetSql(' SELECT M.material ', 1);
         Sql::SetSql(' FROM ron_materials_by_size S ', 1);
         Sql::SetSql(' LEFT JOIN ron_material_list M ON M.id = S.material_id ', 1);
         Sql::SetSql(' WHERE S.size_id = ' . $this->o->GetQs('size', 0), 1);
         Sql::SetSql(' ORDER BY M.material ASC ', 1);
         Sql::SetSql(' ; ', 1);
         Sql::Execute();
     }
     if ($this->o->GetQs('view') == 'sizes_materials') {
         Sql::SetQueryName('current_material');
         Sql::SetSql(' SELECT SL.fraction_in, SL.decimal_in, SL.millimeters ', 1);
         Sql::SetSql(' FROM ron_size_list SL  ', 1);
         Sql::SetSql(' LEFT JOIN ron_materials_by_size MBS ON SL.id = MBS.size_id ', 1);
         Sql::SetSql(' WHERE MBS.material_id = ' . $this->o->GetQs('material', 0), 1);
         Sql::SetSql(' ORDER BY SL.millimeters ASC ', 1);
         Sql::SetSql(' ; ', 1);
         Sql::Execute();
     }
 }
开发者ID:donsmoore,项目名称:ballcalc,代码行数:67,代码来源:classes.php

示例4:

echo Data::GetData('all_sizes', 'millimeters', 'id', $this->GetQs('size'));
echo Data::GetData('all_sizes', 'millimeters', 'id', $this->GetQs('size')) ? ' mm' : '&nbsp;';
?>
    </div>

    <div style="border: 0px solid black; clear: both">
      <br>&nbsp;&nbsp;Materials Available for size: <?php 
echo Data::GetData('all_sizes', 'fraction_in', 'id', $this->GetQs('size'));
?>
&nbsp;<br><br>

      <?php 
if (Data::GetRowCount('current_size') > 0) {
    ?>
      <?php 
    for ($n = 0; $n < Data::GetRowCount('current_size'); $n++) {
        ?>
          &nbsp;&nbsp;<a href="<?php 
        echo Data::Get('current_size', 'page_link', $n);
        ?>
"><?php 
        echo Data::Get('current_size', 'material', $n);
        ?>
</a><br>
      <?php 
    }
    ?>
      <?php 
} else {
    ?>
        &nbsp;&nbsp;None found for size
开发者ID:donsmoore,项目名称:ballcalc,代码行数:31,代码来源:view_default.php

示例5:

<!-- ============ START Sizes ============ -->
  <br><strong>Sizes</strong><br>
    <table>
    <tr>
      <th>Options</th>
      <th>#</th>
      <th>Fraction In.</th>
      <th>Decimal In.</th>
      <th>Millimeters</th>
      <th>one_ball_weight_ounce</th>
      <th>one_ball_weight_gram</th>
      <th style="background-color: white;"></th>
    </tr>
<?php 
for ($n = 0; $n < Data::GetRowCount('all_sizes'); $n++) {
    ?>
    <tr>
    <td>
      <input id="id_<?php 
    echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_edit" type=button title="Edit size" value="Edit" onclick="EditSize('<?php 
    echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
');" style="display: inline">
    </td>
    <td><?php 
    echo $n + 1;
    ?>
</td>
开发者ID:donsmoore,项目名称:ballcalc,代码行数:30,代码来源:view_sizes.php


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