• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getRow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getRow函数的典型用法代码示例。如果您正苦于以下问题:PHP getRow函数的具体用法?PHP getRow怎么用?PHP getRow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: getScalar

function getScalar($query)
{
    $result = getRow($query);
    if (!$result) {
        return false;
    }
    return array_pop($result);
}
开发者ID:arewold,项目名称:calcuttagutta,代码行数:8,代码来源:mysql_dao.php


示例2: index

 public function index()
 {
     try {
         $order = 1;
         if (isset($_REQUEST["order"])) {
             $order = intval($_REQUEST["order"]);
         }
         $roomDAO = CreateObject("Model_DAO_Room");
         $tempOrder = $this->getTempOrder($order);
         //dieu kien where
         $where = "";
         $where = $roomDAO->getWhere();
         //echo $where;
         if (strlen($where) != 0) {
             $where = " where " . $where;
         }
         $this->getObjectSearch();
         // end dieu kien where
         $sql = "select * from " . table_prefix("room") . " " . $where . " " . $tempOrder;
         //echo $sql;
         $page = 1;
         if (isset($_REQUEST["p"])) {
             $page = intval($_REQUEST["p"]);
         }
         $row_total = getRow($sql);
         $page_size = 6;
         $pagegroup_size = 5;
         if (isset($_REQUEST["order"])) {
             $url = "index.php?rt=inex/index&order={$order}";
         } else {
             $url = "index.php?rt=inex/index";
         }
         $rooms = $roomDAO->lists($order, $page * $page_size - $page_size, $page_size);
         $this->registry->template->page = $page;
         $this->registry->template->row_total = $row_total;
         $this->registry->template->page_size = $page_size;
         $this->registry->template->pagegroup_size = $pagegroup_size;
         $this->registry->template->url = $url;
         $this->registry->template->rooms = $rooms;
         $this->registry->template->roomDAO = $roomDAO;
         if (isset($_SESSION["listSoSanh"])) {
             $arrs = $_SESSION["listSoSanh"];
             $roomSoSanhs = array();
             foreach ($arrs as $item) {
                 $obj = $roomDAO->get($item);
                 $roomSoSanhs[] = $obj;
             }
             $this->registry->template->roomSoSanhs = $roomSoSanhs;
             $this->registry->template->order = $order;
         }
         $searchObj = $_SESSION["searchObj"];
         $this->registry->template->searchObj = $searchObj;
         $this->registry->template->show('index_index');
     } catch (MyException $ex) {
         $ex->__toString();
     }
 }
开发者ID:rajveerbeniwal,项目名称:rooms-dhkh,代码行数:57,代码来源:indexController.php


示例3: getCuentasEmailsTo

 function getCuentasEmailsTo()
 {
     $sql = "SELECT * FROM cuentas_emails_to";
     $resultSet = getRS($sql);
     $result = array();
     while ($row = getRow($resultSet)) {
         $result[$row["email"]] = $row["email"];
     }
     return $result;
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:10,代码来源:ExpertoEmails.php


示例4: contactInfo

function contactInfo($db, $call)
{
    $contacts = '';
    $q3 = "SELECT  contact, validity " . "FROM ares_contact_info " . "WHERE `type` = 4 AND `call`='" . $call . "'";
    //echo "<p>[" . $q3 . "]</p>\n";
    $r3 = getResult($q3, $db);
    if ($row3 = getRow($r3, $db)) {
        $contacts = $row3[0];
    }
    echo $contacts . ", ";
}
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:11,代码来源:ECmaillist.php


示例5: completeInfoForApart

 private function completeInfoForApart($apartId)
 {
     $SQL = "SELECT * FROM apartments a " . "WHERE id = " . $apartId;
     try {
         $row = getRow($SQL);
     } catch (Exception $e) {
         throw new Exception("Unable to get apartment info from database");
     }
     if (!$row) {
         throw new Exception("An apartment doesn't exist in the database");
     }
     return $row;
 }
开发者ID:rogelido,项目名称:traveltest,代码行数:13,代码来源:class.search.php


示例6: valorizarPorCliente

 function valorizarPorCliente($year = null, $paraGraf = false)
 {
     $data = "";
     $sql = "SELECT *\n\t\t\t\tFROM\n\t\t\t\t(\n\t\t\t\t  SELECT t2.id_cliente, t2.razon_social_cliente, SUM(t1.total_venta) total_por_cliente\n\t\t\t\t  FROM ventas t1\n\t\t\t\t  INNER JOIN clientes t2 ON t2.id_cliente=t1.id_cliente\n\t\t\t\t  WHERE t1.id_registro_estado=1\n\t\t\t\t  AND EXTRACT(YEAR FROM t1.fecha_venta) = {$year}\n\t\t\t\t  GROUP BY t2.id_cliente\n\t\t\t\t) rs1\n\t\t\t\tORDER BY total_por_cliente DESC";
     $rs = getRS($sql);
     $sql = "SELECT SUM(t1.total_venta) total_por_anio\n\t\t\t\t  FROM ventas t1\n\t\t\t\t  WHERE t1.id_registro_estado=1\n\t\t\t\t  AND EXTRACT(YEAR FROM t1.fecha_venta) = {$year}";
     $rsTotalPorAnio = getRS($sql);
     $rowTotalPorAnio = getRow($rsTotalPorAnio);
     $totalPorAnio = $rowTotalPorAnio["total_por_anio"];
     $porc_cte = 0;
     $total_acum = 0;
     $porc_fact = 0;
     $porc_acum = 0;
     $nroDeClientes = getNrosRows($rs);
     if ($nroDeClientes) {
         $nro = 1;
         while ($row = getRow($rs)) {
             $porc_cte = round($nro * 100 / $nroDeClientes, 2);
             $porc_fact = round($row["total_por_cliente"] * 100 / $totalPorAnio, 4);
             $porc_acum += $row["total_por_cliente"] * 100 / $totalPorAnio;
             $total_acum += $row["total_por_cliente"];
             $porc_item = round($porc_acum, 4);
             if ($porc_item >= 0 && $porc_item <= 80) {
                 $clase = "A";
             } else {
                 if ($porc_item > 80 && $porc_item <= 90) {
                     $clase = "B";
                 } else {
                     $clase = "C";
                 }
             }
             if (!$paraGraf) {
                 $data .= "<row id='" . $row["id_cliente"] . "'>" . "<cell><![CDATA[" . $nro . "]]></cell>" . "<cell><![CDATA[" . $row["razon_social_cliente"] . "]]></cell>" . "<cell><![CDATA[" . $porc_cte . "]]></cell>" . "<cell><![CDATA[" . round($row["total_por_cliente"], 2) . "]]></cell>" . "<cell><![CDATA[" . $porc_fact . "]]></cell>" . "<cell><![CDATA[" . round($total_acum, 2) . "]]></cell>" . "<cell><![CDATA[" . $porc_item . "]]></cell>" . "<cell><![CDATA[" . $clase . "]]></cell></row>";
             } else {
                 if ($nro == 11) {
                     break;
                 }
                 $data .= "<item id='{$nro}'><cliente>" . $row["razon_social_cliente"] . "</cliente><monto>" . round($row["total_por_cliente"], 2) . "</monto></item>";
             }
             $nro++;
         }
     }
     if (!$paraGraf) {
         $fin = "</rows>";
         $cab = "<?xml version='1.0' encoding='iso-8859-1'?><rows>";
     } else {
         $fin = "</data>";
         $cab = "<data>";
     }
     return $cab . $data . $fin;
 }
开发者ID:sugarnet,项目名称:feanor-sg1,代码行数:51,代码来源:ExpertoABC.php


示例7: challenge

 public function challenge()
 {
     global $cn;
     // DB読込み(メンバーテーブルから認証)
     $strSQL = "select a.member_id, a.login_pwd as pass, a.login_pwd_md5 as hashed_pass, a.pass_salt, a.name1, a.name2, a.disp_name, a.email, a.nickname, a.api_key, a.force_chpwd, a.login_ok_ymd " . "from v_member_header a " . "where login_id = '{$_REQUEST['email']}' ";
     $result = selectQuery($cn, $strSQL);
     if ($row = getRow($result)) {
         RCMSUser::setLogin($row, $_REQUEST['login_save']);
         LoginHistory::write($cn, RCMSUser::getUser());
         $_SESSION["password_inputted"] = 1;
         return array(true, $_REQUEST['login_save'] == 1);
     }
     return array(true, $_REQUEST['login_save'] == 1);
 }
开发者ID:hiroaki-mizuno,项目名称:docker,代码行数:14,代码来源:.mylib.php


示例8: contactInfo

function contactInfo($db, $call)
{
    $contacts = '';
    $q3 = "SELECT ares_contact_type, contact, validity, A.type " . "FROM ares_contact_info A, ares_contact_type B " . "WHERE A.type = B.type AND A.call='" . $call . "'";
    //echo "<p>" . $q3 . ",/p>\n";
    $r3 = getResult($q3, $db);
    while ($row3 = getRow($r3, $db)) {
        $xx = $row3[1];
        if ($row3[3] < 4) {
            $xx = formatNumber($row3[1]);
        }
        if ($row3[2] == 1) {
            $contacts = $contacts . $row3[0] . ": <b>" . $xx . "</b><br>";
        } else {
            $contacts = $contacts . $row3[0] . ": " . $xx . "<br>";
        }
    }
    echo $contacts;
}
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:19,代码来源:ECcontact.php


示例9: del_file

function del_file($fid, $user = 0)
{
    $del_time = time() + 8 * 3600;
    if ($user == 1) {
        $sql = "select filepath from files where fid = '{$fid}'";
        if ($file = getRow($sql)) {
            $path = $file['filepath'];
            if (file_exists($path)) {
                unlink($path);
                // 彻底删除
            } else {
                $err_msg = "对不起,该文件不存在,请检查文件名!";
            }
            /*
            	删除成功,才能修改数据库,否则数据将发生不完整性!此逻辑有些问题
            	如果文件不存在,但是找到了,说明数据库有记录,此时也应该删除该记录,因为此记录是无效记录
            */
            $sql = "delete from files where fid = '{$fid}'";
            // 彻底删除
        } else {
            $err_msg = "对不起,删除失败,该文件可能不存在,请检查文件名,或者稍后再试!";
        }
    } else {
        $sql = "update files set status = 2, del_time = {$del_time} where fid = '{$fid}'";
    }
    /*print_r($sql);
    	exit;*/
    $result = mysql_query($sql);
    if (!$result) {
        $err_msg = "对不起,删除失败,数据库繁忙,请稍后再试!";
    } else {
        if (mysql_affected_rows() == 0) {
            $err_msg = "对不起,删除失败,该文件可能不存在,请检查文件名,或者稍后再试!";
        }
    }
    if (isset($err_msg)) {
        //echo $err_msg;
        return $err_msg;
    }
    return true;
}
开发者ID:ywang2014,项目名称:WebSys,代码行数:41,代码来源:file_delete.php


示例10: displayRows

function displayRows($data, $alldata)
{
    if (!count($data)) {
        return;
    }
    $titlerow = '
	<div class="titlerow">
		<div class="span-9">Auth Item</div><div class="span-2">Currently Included</div><div class="span-2">Indirectly Included</div><div class="span-2">Include</div>
	</div>
	';
    $evenodd = array('evenrow', 'oddrow');
    $types = array('Operations', 'Op Groups (Tasks)', 'Roles');
    foreach (array(2, 1, 0) as $type) {
        $panels[$types[$type]] = $titlerow;
        $rownum[$types[$type]] = 0;
    }
    foreach ($data as $datum) {
        $panel = $types[$datum['type']];
        $panels[$panel] .= '<div class="' . $evenodd[$rownum[$panel]++ % 2] . '">';
        $panels[$panel] .= getRow($datum, $alldata);
        $panels[$panel] .= '</div>';
    }
    return $panels;
}
开发者ID:hotbaby,项目名称:yii-hrbac,代码行数:24,代码来源:assign.php


示例11: array

for ($iCt = 0; $iCt < count($names); $iCt++) {
    #    $savefile = $name;
    $savefile = $names[$iCt];
    $reg = "/^(\\d{1,3}\\.){3}\\d{1,3},\\s{$savefile},\\s\\d{4}\\/\\d{2}\\/\\d{2},\\s\\d{2}:\\d{2}:\\d{2},\\sW3SVC1,\\sPOPPY,\\s192\\.168\\.30\\.17,\\s\\d{1,5},\\s\\d{1,5},\\s\\d{1,5},\\s\\d{1,5},\\s\\d{1,5},\\s.{3,4},\\s.*\\/(login\\.asp|HqMain\\.asp|HallMain\\.asp|HqMenu\\.asp),/i";
    $files = array();
    $drc = dir($directory);
    while ($fl = $drc->read()) {
        if ($fl == '.' or $fl == '..') {
            continue;
        }
        # filesに追加
        $files[] = $directory . "/" . $fl;
    }
    sort($files);
    for ($i = 0; $i < count($files); $i++) {
        getRow($files[$i], $reg, $savefile);
    }
}
function getRow($file, $reg, $savefile)
{
    echo $file . "::" . $savefile . "<BR>";
    $fp = fopen($file, 'r') or die('end');
    $result = array();
    while (!feof($fp)) {
        $row = fgets($fp, 1024);
        if (preg_match($reg, $row)) {
            $result[] = $row;
            echo $row . "::" . $savefile . "<BR>";
        }
    }
    fclose($fp);
开发者ID:jinno,项目名称:stoaconverter,代码行数:31,代码来源:Converter.php


示例12: header

<?php

/*
	文件预览
	
	改进:使用id传递不够安全,容易被用户自己输入id查看
		使用自己的加密技术
		或者使用md5加密id等,由于加密不可逆,故数据库需要存储此md5值!
		
		window.location更加不安全,把路径名等,全部暴露了,
			需要改进,使用加密技术生成!
*/
header('content-type: text/html; charset=utf-8');
require "../include/init.php";
require_once '../include/file.func.tool.php';
$fid = $_GET['fid'] + 0;
// 安全检查
$sql = "select * from files where fid = '{$fid}'";
if ($file = getRow($sql, $conn)) {
    echo "<script> window.location=\"" . $file['filepath'] . "\";</script> ";
    // echo nl2br(htmlentities(file_get_contents($file['filepath']))); 乱码,格式也不对
} else {
    echo "id 非法!";
}
开发者ID:ywang2014,项目名称:WebSys,代码行数:24,代码来源:file_read.php


示例13: while

 while ($row2 = getRow($r2, $db)) {
     //echo $district . ',' . $row2[0] . "<br>\n";
     $q3 = 'SELECT `aresmem`,`drillsnum`,`drillshrs`,`psesnum`,`pseshrs`,`eopsnum`,`eopshrs`,`aresopsnum`,`aresops` ' . "FROM `arpsc_ecrept` WHERE `county`='" . $row2[1] . "' AND `period`=" . $period;
     $r3 = getResult($q3, $db);
     if ($row3 = getRow($r3, $db)) {
         $hours = $row3[2] + $row3[4] + $row3[6] + $row3[8];
         $value = $hours * 18.11;
         $lastperiod = $period - 1;
         $q4 = "SELECT `aresmem` FROM `arpsc_ecrept` WHERE `county`='" . $row2[1] . "' AND `period`=" . $lastperiod;
         $r4 = getResult($q4, $db);
         if ($row4 = getRow($r4, $db)) {
             $change = $row3[0] - $row4[0];
         } else {
             $q4 = "SELECT `aresmem` FROM `arpsc_ecrept` WHERE `county`='" . $row2[1] . "' AND `period`=0";
             $r4 = getResult($q4, $db);
             if ($row4 = getRow($r4, $db)) {
                 $change = $row3[0] - $row4[0];
             } else {
                 $change = " ";
             }
         }
         echo "\t<tr>\n";
         if ($district != $olddistrict) {
             echo $district;
             $olddistrict = $district;
         }
         echo ',' . $row2[0] . ',' . round($hours) . ',' . round($value) . ',' . $row3[0] . ',' . $change . ',' . $row3[1] . ',' . $row3[2] . ',' . $row3[3] . ',' . $row3[4] . ',' . $row3[5] . ',' . $row3[6] . "<br .>\n";
     } else {
         if ($row2[0] == 'Arenac') {
             if ($district != $olddistrict) {
                 echo $district;
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:31,代码来源:monthly-report-2.php


示例14: COUNT

$q6 = "SELECT COUNT(*) FROM `arpsc_ecrept` WHERE `period`=";
$testperiod = (int) $p9 + 1;
$q6 = $q6 . $testperiod;
$r6 = getResult($q6, $db);
$row6 = getRow($r6, $db);
if ($row6[0] > 0) {
    $url = "Summary.php?period=" . $testperiod;
    echo "      <td class=\"" . $rowclass . "\"><a href=\"" . $url . "\">Fwd 1m&gt;</a></td>\n";
} else {
    echo "      <td class=\"" . $rowclass . "\">Fwd 1m&gt;</td>\n";
}
$q6 = "SELECT COUNT(*) FROM `arpsc_ecrept` WHERE `period`=";
$testperiod = (int) $p9 + 3;
$q6 = $q6 . $testperiod;
$r6 = getResult($q6, $db);
$row6 = getRow($r6, $db);
if ($row6[0] > 0) {
    $url = "Summary.php?period=" . $testperiod;
    echo "      <td class=\"" . $rowclass . "\"><a href=\"" . $url . "\">Fwd 1Q&gt;&gt;</a></td>\n";
} else {
    echo "      <td class=\"" . $rowclass . "\">Fwd 1Q&gt;&gt;</td>\n";
}
echo "    </table>\n";
echo "    <p>&nbsp;</p>\n";
echo "    </center>";
echo "  </div>\n\n";
sectLeaders($db);
footer($starttime . "Z", $maxdate, "\$Revision: 1.0 \$ - \$Date: 2008-10-15 15:08:57-04 \$");
?>
</div>
</body>
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:31,代码来源:Summary.php


示例15: usort

    global $array, $column;
    $array = $arr;
    $column = $col;
    usort($array, "cmp");
    return $array;
}
$ip = $_SERVER['REMOTE_ADDR'];
$entry_line = $ip . "\r\n";
$fp = fopen('logs.txt', 'a');
fputs($fp, $entry_line);
fclose($fp);
$file = file('logs.txt');
$counts = array_count_values($file);
$ipList = array_unique($file);
$array = array();
$ind = 0;
for ($i = 0; $i < count($file); $i++) {
    if (array_key_exists($i, $ipList)) {
        $array[$ind][0] = $ipList[$i];
        $array[$ind++][1] = $counts[$ipList[$i]];
    }
}
$array = razor_sort($array, 1);
$text = '';
for ($i = count($array) - 1; $i >= 1; $i--) {
    $text .= getRow($array[$i][0], $array[$i][1]);
}
echo getTable($text);
?>
</body>
</html>
开发者ID:ShutovPS,项目名称:bsuir_poit,代码行数:31,代码来源:index.php


示例16: getNeighbour

/**
 * Find an adjacent article relative to a provided threshold level
 *
 * @param scalar $threshold The value to compare against
 * @param string $s string Optional section restriction
 * @param string $type string Find lesser or greater neighbour? Possible values: '<' (previous, default) or '>' (next)
 * @param array $atts Attribute of article at threshold
 * @param string $threshold_type 'cooked': Use $threshold as SQL clause; 'raw': Use $threshold as an escapable scalar
 * @return array|string An array populated with article data, or the empty string in case of no matches
 */
function getNeighbour($threshold, $s, $type, $atts = array(), $threshold_type = 'raw')
{
    global $prefs;
    static $cache = array();
    $key = md5($threshold . $s . $type . join(n, $atts));
    if (isset($cache[$key])) {
        return $cache[$key];
    }
    extract($atts);
    $expired = $expired && $prefs['publish_expired_articles'];
    $customFields = getCustomFields();
    //Building query parts
    // lifted from publish.php. This is somewhat embarrassing, isn't it?
    $ids = array_map('intval', do_list($id));
    $id = !$id ? '' : " and ID IN (" . join(',', $ids) . ")";
    switch ($time) {
        case 'any':
            $time = "";
            break;
        case 'future':
            $time = " and Posted > now()";
            break;
        default:
            $time = " and Posted <= now()";
    }
    if (!$expired) {
        $time .= " and (now() <= Expires or Expires = " . NULLDATETIME . ")";
    }
    $custom = '';
    if ($customFields) {
        foreach ($customFields as $cField) {
            if (isset($atts[$cField])) {
                $customPairs[$cField] = $atts[$cField];
            }
        }
        if (!empty($customPairs)) {
            $custom = buildCustomSql($customFields, $customPairs);
        }
    }
    if ($keywords) {
        $keys = doSlash(do_list($keywords));
        foreach ($keys as $key) {
            $keyparts[] = "FIND_IN_SET('" . $key . "',Keywords)";
        }
        $keywords = " and (" . join(' or ', $keyparts) . ")";
    }
    // invert $type for ascending sortdir
    $types = array('>' => array('desc' => '>', 'asc' => '<'), '<' => array('desc' => '<', 'asc' => '>'));
    $type = $type == '>' ? $types['>'][$sortdir] : $types['<'][$sortdir];
    // escape threshold and treat it as a string unless explicitly told otherwise
    if ($threshold_type != 'cooked') {
        $threshold = "'" . doSlash($threshold) . "'";
    }
    $safe_name = safe_pfx('textpattern');
    $q = array("select ID, Title, url_title, unix_timestamp(Posted) as uposted\n\t\t\tfrom " . $safe_name . " where {$sortby} {$type} " . $threshold, $s != '' && $s != 'default' ? "and Section = '" . doSlash($s) . "'" : filterFrontPage(), $id, $time, $custom, $keywords, 'and Status=4', 'order by ' . $sortby, $type == '<' ? 'desc' : 'asc', 'limit 1');
    $cache[$key] = getRow(join(n . ' ', $q));
    return is_array($cache[$key]) ? $cache[$key] : '';
}
开发者ID:bgarrels,项目名称:textpattern,代码行数:68,代码来源:txplib_publish.php


示例17: while

?>
  <h1>Used Cars for Sale</h1>

  <a href="index.html">Back</a><br><br>

  <form method="post">
    <fieldset>
      <legend>Download Results</legend>
      <p>
        <input type="submit" name="download" id="download" value="Download Excel Spreadsheet">
      </p>
    </fieldset>
  </form>

  <?php 
while ($row = getRow($result)) {
    ?>
    <h2><?php 
    echo $row['make'];
    ?>
</h2>
    <ul>
      <li>Price: $<?php 
    echo number_format($row['price'], 2);
    ?>
</li>
      <li>Year: <?php 
    echo $row['yearmade'];
    ?>
</li>
      <li>Mileage: <?php 
开发者ID:sbogdanov108,项目名称:db_to_text,代码行数:31,代码来源:cars_excel.php


示例18: mysql_connect

include 'includes/functions.inc';
// Open the database
$db = mysql_connect($host, $dbuser, $dbpassword);
mysql_select_db($DatabaseName, $db);
// Get the requested county
$county = $_GET['county'];
//===========================================================================
// D a t a b a s e   D a t a
//===========================================================================
// Initialize the database query
$q3 = "SELECT `drillshrs`,`pseshrs`,`eopshrs`,`aresops`,`period` " . "FROM `arpsc_ecrept` WHERE `county`='" . $county . "' ORDER BY `period`";
$r3 = getResult($q3, $db);
$i = 0;
// Index into arrays to store results to graph
// Loop through all returned rows
while ($row3 = getRow($r3, $db)) {
    if ($row3[4] > 0) {
        $hours = $row3[0] + $row3[1] + $row3[2] + $row3[3];
        $i = $i + 1;
        $x[$i] = $row3[4];
        // Period
        $y[$i] = $hours;
        // Total hours
        $y1[$i] = $row3[0];
        // Drills
        $y2[$i] = $row3[1];
        // Public Service
        $y3[$i] = $row3[2];
        // Emergency
        $y4[$i] = $row3[3];
        // Admin
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:31,代码来源:ecrptigl.php


示例19: convertDate

 // Display the month name for this report
 $SQL = 'SELECT `lastday` FROM `periods` WHERE `periodno`=' . $period;
 $periodname = convertDate(singleResult($SQL, $db));
 // Get the actual report data for this period
 $SQL = 'SELECT B.`netfullname`,A.`QNI`,A.`QTC`,A.`QTR`,A.`sessions`,' . 'A.`updated`,A.`manhours`,A.`netid` ' . 'FROM `netreport` A, `nets` B ' . 'WHERE A.`period`=' . $period . ' AND A.`netID`=B.`netID` ' . 'ORDER BY `QTC` DESC, `QNI` DESC';
 $result = getResult($SQL, $db);
 // We will use rownum to keep track of light and dark rows
 $rownum = 1;
 // The following variables are used to calculate totals for the month
 $TQNI = 0;
 $TQTC = 0;
 $TQTR = 0;
 $TSess = 0;
 $TMH = 0;
 // Loop through the rows of the result
 while ($myrow = getRow($result, $db)) {
     // Update the latest data date, if necessary
     if ($myrow[5] > $maxdate) {
         $maxdate = $myrow[5];
     }
     // Calculate totals for the obvious ones
     $TQNI = $TQNI + $myrow[1];
     $TQTC = $TQTC + $myrow[2];
     $TQTR = $TQTR + $myrow[3];
     $TSess = $TSess + $myrow[4];
     // For manhours, use reported if available
     if ($myrow[6] > 0) {
         $TMH = $TMH + $myrow[6];
     } else {
         if ($myrow[4] > 0 && $myrow[3] > 0) {
             $manhours = $myrow[3] / $myrow[4] * $myrow[1];
开发者ID:jjmcd,项目名称:mi-nts,代码行数:31,代码来源:nettotals.php


示例20: maxArg

#                                                                                                                       #
#   This work is made available under the terms of the Creative Commons Attribution-NonCommercial 3.0 Unported,         #
#                                                                                                                       #
#   http://creativecommons.org/licenses/by-nc/3.0/legalcode                                                             #
#                                                                                                                       #
#   This work is WITHOUT ANY WARRANTY; without even the implied warranty of FITNESS FOR A PARTICULAR PURPOSE.           #
#                                                                                                                       #
#########################################################################################################################
maxArg(2);
$uid = getVar("id");
if ($uid) {
    //Display single users
    $select = intval($uid) != 0 ? "user_id" : "username";
    //$select = "user_id";
    $sql = "SELECT * \n\t\t\t\tFROM users\n\t\t\t\tWHERE {$select}='{$uid}'\n\t\t\t";
    $data = getRow($sql);
    if ($data) {
        ?>
			<h3><?php 
        echo $data['username'];
        ?>
's Profile</h3>
			<img src="http://www.gravatar.com/avatar/<?php 
        echo md5($data['email']);
        ?>
?d=monsterid">
			<table border=0>
				<tr><td></td><td></td></tr>
				<?php 
        foreach ($data as $field => $val) {
            echo "<tr><td>{$field}</td><td>  =>  </td><td> {$val}</td></tr>";
开发者ID:bbulpett,项目名称:MyIchimoku,代码行数:31,代码来源:user.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getRows函数代码示例发布时间:2022-05-15
下一篇:
PHP getRoute函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap