當前位置: 首頁>>代碼示例>>PHP>>正文


PHP dbconnection::fetchrow方法代碼示例

本文整理匯總了PHP中dbconnection::fetchrow方法的典型用法代碼示例。如果您正苦於以下問題:PHP dbconnection::fetchrow方法的具體用法?PHP dbconnection::fetchrow怎麽用?PHP dbconnection::fetchrow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dbconnection的用法示例。


在下文中一共展示了dbconnection::fetchrow方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: preload_lists

function preload_lists()
{
    $db = new dbconnection();
    $db->dbconnect();
    $db->query = "select listid,listname from " . TABLE_LISTS . " where active=1";
    $db->execute();
    $rowcount = $db->rowcount();
    if ($rowcount > 0) {
        for ($x = 0; $x < $rowcount; $x++) {
            $row = $db->fetchrow($x);
            $list[$x] = $row;
        }
    }
    return $list;
}
開發者ID:CallBest,項目名稱:CallCenter-CIMS,代碼行數:15,代碼來源:preloadvalues.php

示例2: dologin

 function dologin($username, $password)
 {
     $enc = new Encryption();
     $password = $enc->oneway_encode($password);
     $db = new dbconnection();
     $db->dbconnect();
     $db->query = "select * from " . TABLE_USERS . " where username='{$username}' and password='{$password}'";
     $db->execute();
     if ($db->rowcount() > 0) {
         $row = $db->fetchrow(0);
         $userid = $row['userid'];
         $ipaddr = $_SERVER['REMOTE_ADDR'];
         $lastlogin = Date("Y-m-d H:i:s");
         $db->query = "update " . TABLE_USERS . " set lastlogin='{$lastlogin}' where userid={$userid}";
         $db->execute();
         $db->query = "insert into " . TABLE_USERLOGS . " (userid,ipaddress,logdate,action)\n        values ({$userid},'{$ipaddr}','{$lastlogin}','LOGIN')\n        ";
         $db->execute();
         return $row;
     } else {
         $db->dbclose();
         return false;
     }
 }
開發者ID:CallBest,項目名稱:CallCenter-CIMS,代碼行數:23,代碼來源:user.php

示例3: dbconnection

.col3_mbclient_no{margin-left:5px;}
.col3txt_branchremarks {border:0px;border-bottom:1px solid black;margin-left:5px;}
				</style>
		<title>Metrobank Application Form</title>
    </head>
<?php 
if (isset($_REQUEST['leadid'])) {
    $leadid = $_REQUEST['leadid'];
    require_once '../../includes/dbase.php';
    require_once '../../includes/settings.php';
    $db = new dbconnection();
    $db->dbconnect();
    $db->query = "select * from " . TABLE_CLIENTS . " a left join " . TABLE_CLIENTINFO . " b on (a.leadid=b.leadid) where a.leadid={$leadid}";
    $db->execute();
    if ($db->rowcount() > 0) {
        $row = $db->fetchrow(0);
    }
}
?>
<body>
    
    <div id="main">
	
        <div class="column1">
            <h3>ALL FIELDS ARE MANDATORY AND MUST BE FILLED UP.</h3><br>
			
			<b>MY CHOICE OF A METROBANK CREDIT CARD</b><br>
			
			<?php 
switch (strtoupper($row['mccardtype'])) {
    case 'CLASSIC MASTERCARD':
開發者ID:CallBest,項目名稱:CallCenter-CIMS,代碼行數:31,代碼來源:MBAppForm.php

示例4: on

    } else {
        $appliedcard = $_REQUEST['appliedcard'];
    }
} else {
    $appliedcard = '';
}
if (isset($_REQUEST['applied'])) {
    $checked = $_REQUEST['applied'];
} else {
    $checked = '';
}
//actual query
if ($appliedcard != '') {
    $db->query = "\n      select * from " . TABLE_CLIENTS . " a\n      inner join " . TABLE_LISTS . " b on (a.listid=b.listid)\n      inner join " . TABLE_USERS . " c on (a.agent=c.userid)\n      inner join " . TABLE_CARDS . " d on (a.leadid=d.leadid)\n      where disposition='{$dispo}' and teamid={$teamid} {$listid} and {$appliedcard}='{$checked}' order by {$sort} limit {$start}, {$end}\n    ";
    $db->execute();
} else {
    $db->query = "\n      select * from " . TABLE_CLIENTS . " a\n      inner join " . TABLE_LISTS . " b on (a.listid=b.listid)\n      inner join " . TABLE_USERS . " c on (a.agent=c.userid)\n      where disposition='{$dispo}' and teamid={$teamid} {$listid} order by {$sort} limit {$start}, {$end}";
    $db->execute();
}
$gridvalues = array();
$tablebody = "";
$rowcount = $db->rowcount();
for ($x = 0; $x < $rowcount; $x++) {
    $row = $db->fetchrow($x);
    $gridvalues[$x] = $row;
}
$body->template_loop('gridvalues', $gridvalues);
$body->add_key('prev', $start - 10);
$body->add_key('next', $start + 10);
$activelist = preload_lists();
$body->template_loop('list', $activelist);
開發者ID:CallBest,項目名稱:CallCenter-CIMS,代碼行數:31,代碼來源:gridview.php


注:本文中的dbconnection::fetchrow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。