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


PHP MySQLDatabase::num_rows方法代码示例

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


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

示例1: MySQLDatabase

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>Active Notifications</h2>
				<hr>
						<?php 
$database = new MySQLDatabase();
$active_notifications = "SELECT * FROM `applicant_notifications` as app_not JOIN `personal_details` as per WHERE status = 1 AND recipient_id = " . $session->applicant_id . " AND app_not.sender_id=per.applicant_id";
$result = $database->query($active_notifications);
$pagecounter = 1;
$serialno = 1;
$max = 10;
$number_of_notifications = $database->num_rows($result);
echo '<div class="tabbable">
								<div class="tab-content">';
while ($row = $database->fetch_array($result)) {
    if ($serialno % $max == 1) {
        if ($pagecounter == 1) {
            echo '<div class="tab-pane active" id="' . $pagecounter . '">';
        } else {
            echo '<div class="tab-pane" id="' . $pagecounter . '">';
        }
        echo '<table class="table table-hover">
									<thead>
										<tr>
											<th>S/N</th>
											<th>Sender</th>
											<th>Title</th>
开发者ID:Ghaji,项目名称:form_application,代码行数:30,代码来源:view_applicant_active_notifications.php

示例2: MySQLDatabase

	
	<table class="table table-hover table-stripped">
		<thead>
			<tr>
				<th>S/N</th>
				<th>Passport</th>
				<th>Full Name</th>
				<th>Email</th>
                <th>Details</th>
			</tr>
		</thead>
		<tbody>
			<?php 
$db = new MySQLDatabase();
$credits = $db->query("SELECT * FROM credits WHERE status='active' ORDER BY credit_id ASC");
$numrows = $db->num_rows($credits);
$passport_path = "documents" . DS . "credit_passports" . DS;
$serial_no = 1;
$numrows;
while ($row = $db->fetch_array($credits)) {
    $mail = str_replace("@", "[at]", $row["email"]);
    if (empty($numrows)) {
        echo '<tr><td colspan="5" align="center">No Information Uploaded for the developer\'s Team</td></tr>';
    } else {
        echo '<tr>
						<td>' . $serial_no . '</td>
						<td><div class="thumbnail" style="width: 100px; height: 133px;"><img src="' . $passport_path . $row["passport"] . '" width="100px" height="90px"></div></td>
						<td>' . $row["fullname"] . '</td>
						<td>' . $mail . '</td>
						<td><a href="developer_details.php?id=' . customEncrypt($row["credit_id"]) . '" class="btn">More...</a></td>
					</tr>';
开发者ID:Ghaji,项目名称:form_application,代码行数:30,代码来源:credit.php

示例3: elseif

    } elseif ($key == 'date' && sizeof($arrayDateSpec) != 0) {
        $whereclause .= "AND (" . dateclause() . ")";
    } elseif (($value != 'all' || $value == '0') && ($key != 'applicant_name' && $key != 'date')) {
        if ($key == 'state_id' && $value != 'all') {
            $whereclause .= "AND (" . lgaClause() . ")";
        } else {
            $whereclause .= "AND " . $key . " = '" . $value . "'";
        }
    }
}
//$sql = "SELECT * FROM personal_details " . $whereclause;
$sql = "SELECT * FROM personal_details p JOIN department d JOIN admission_status ads WHERE p.programme_applied_id = d.department_id AND p.applicant_id = ads.applicant_id AND p.progress = 'Completed' " . $whereclause;
//die($sql);
$row_count = 1;
$applicant_personal_details_result = $database->query($sql);
$number_of_applicants = $database->num_rows($applicant_personal_details_result);
if ($number_of_applicants > 0) {
    echo '<h4 align="center"><span class="badge badge-info">' . $number_of_applicants . '</span> applicant(s) found</h4>';
    $number_of_pages = ceil($number_of_applicants / 10);
    echo '<div class="tabbable">';
    echo '<input type="hidden" value="' . $applicant_personal_details_result . '" name="exportdata"/>';
    echo '<div class="tab-content">';
    $link_str = "";
    $pagecounter = 1;
    $serialno = 1;
    while ($result = $database->fetch_array($applicant_personal_details_result)) {
        if ($serialno % 10 == 1) {
            if ($pagecounter == 1) {
                echo '<div class="tab-pane active" id="' . $pagecounter . '">';
                //$link_str .= '<li><a class="link" href="#page_'.$pagecounter.'">'.$pagecounter.'</a></li>';
            } elseif ($pagecounter == 2) {
开发者ID:Ghaji,项目名称:transcripts,代码行数:31,代码来源:ajax_view.php

示例4: MySQLDatabase

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>Users</h2>
				<hr>
						<?php 
$database = new MySQLDatabase();
$select_users_sql = "SELECT * FROM `admin_users` adu, admin_roles adr WHERE adu.role = adr.admin_role_id ORDER BY adu.`staff_id` ASC";
$users_result = $database->query($select_users_sql);
$pagecounter = 1;
$serialno = 1;
$max = 10;
$number_of_users = $database->num_rows($users_result);
echo '<div class="tabbable">
								<div class="tab-content">';
while ($row = $database->fetch_array($users_result)) {
    if ($serialno % $max == 1) {
        if ($pagecounter == 1) {
            echo '<div class="tab-pane active" id="' . $pagecounter . '">';
        } else {
            echo '<div class="tab-pane" id="' . $pagecounter . '">';
        }
        echo '<table class="table table-hover">
								<thead>
									<tr>
										<th>S/N</th>
										<th>Staff ID</th>
										<th>Full Name</th>
开发者ID:Ghaji,项目名称:form_application,代码行数:30,代码来源:view_users.php

示例5: MySQLDatabase

		<div class="row-fluid">

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>View Developer Details</h2>
				<hr>
						<?php 
$database = new MySQLDatabase();
$result = $database->query("SELECT * FROM `credits`");
$pagecounter = 1;
$serialno = 1;
$max = 10;
$number_of_credits = $database->num_rows($result);
echo '<div class="tabbable">
								<div class="tab-content">';
while ($row = $database->fetch_array($result)) {
    if ($serialno % $max == 1) {
        if ($pagecounter == 1) {
            echo '<div class="tab-pane active" id="' . $pagecounter . '">';
        } else {
            echo '<div class="tab-pane" id="' . $pagecounter . '">';
        }
        echo '<table class="table table-hover">
									<thead>
										<tr>
											<th>S/N</th>
											<th>Fullname</th>
											<th>Email</th>
开发者ID:Ghaji,项目名称:form_application,代码行数:31,代码来源:view_credit.php

示例6: applicant

                $whereclause .= " AND d.department_id = '" . $value . "'";
            }
            break;
        case 'approval_status':
            if (!empty($value) && $value != 'all') {
                $whereclause .= " AND acc.ResponseCode = '" . $value . "'";
            }
            break;
    }
}
//$query_acceptance = "SELECT * FROM acceptance_log, JOIN personal_details p, department d, faculty f WHERE acc.student_id = p.form_id AND p.programme_applied_id = d.department_id AND f.faculty_id = d.faculty_id". $whereclause;
$query_acceptance = "SELECT * FROM acceptance_log acc, personal_details p, department d, faculty f WHERE acc.student_id = p.form_id AND p.programme_applied_id = d.department_id AND f.faculty_id = d.faculty_id" . $whereclause;
//print_r($query_acceptance);
$row_count = 1;
$result = $database->query($query_acceptance);
$number_of_records = $database->num_rows($result);
if ($number_of_records > 0) {
    echo '<h4 align="center"><span class="badge badge-info">' . $number_of_records . '</span> applicant(s) found</h4>';
    echo '<div class="tabbable">';
    //echo '<input type="hidden" value="'.$result.'" name="exportdata"/>';
    echo '<div class="tab-content">';
    $link_str = "";
    $pagecounter = 1;
    $serialno = 1;
    $max = 10;
    $number_of_pages = ceil($number_of_records / $max);
    while ($record = $database->fetch_array($result)) {
        if ($serialno % $max == 1) {
            if ($pagecounter == 1) {
                echo '<div class="tab-pane active" id="' . $pagecounter . '">';
            } elseif ($pagecounter == 2) {
开发者ID:Ghaji,项目名称:form_application,代码行数:31,代码来源:ajax_search_acceptance.php

示例7: MySQLDatabase

		<div class="row-fluid">

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>View Developer Details</h2>
				<hr>
						<?php 
$database = new MySQLDatabase();
$result = $database->query("SELECT * FROM `themes`");
$pagecounter = 1;
$serialno = 1;
$max = 10;
$number_of_themes = $database->num_rows($result);
echo '<div class="tabbable">
								<div class="tab-content">';
while ($row = $database->fetch_array($result)) {
    if ($serialno % $max == 1) {
        if ($pagecounter == 1) {
            echo '<div class="tab-pane active" id="' . $pagecounter . '">';
        } else {
            echo '<div class="tab-pane" id="' . $pagecounter . '">';
        }
        echo '<table class="table table-hover">
									<thead>
										<tr>
											<th>S/N</th>
											<th>Institution Name</th>
											<th>Institution Caption</th>
开发者ID:Ghaji,项目名称:form_application,代码行数:31,代码来源:view_theme.php

示例8: MySQLDatabase

		<div class="row-fluid">

			<?php 
include_layout_template('admin_menu.php');
?>

			<div class="span9">
				<h2>View Amount Details</h2>
				<hr>
						<?php 
$database = new MySQLDatabase();
$result = $database->query("SELECT * FROM `form_amount`, `faculty` WHERE form_amount.student_status = faculty.faculty_code");
$pagecounter = 1;
$serialno = 1;
$max = 5;
$number_of_amounts = $database->num_rows($result);
echo '<div class="tabbable">
								<div class="tab-content">';
while ($row = $database->fetch_array($result)) {
    if ($serialno % $max == 1) {
        if ($pagecounter == 1) {
            echo '<div class="tab-pane active" id="' . $pagecounter . '">';
        } else {
            echo '<div class="tab-pane" id="' . $pagecounter . '">';
        }
        echo '<table class="table table-hover">
									<thead>
										<tr>
											<th>S/N</th>
											<th>Programme</th>
											<th>Amount</th>
开发者ID:Ghaji,项目名称:form_application,代码行数:31,代码来源:view_amount.php


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