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


PHP Tasks::fetch方法代码示例

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


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

示例1: Tasks

		$('.close-button').click(function(){
		$('#table_overlay').fadeOut('fast');
		$('#table_overlay_div').fadeOut('fast');
			});
		});
		</script>
	</head>
	<body>
		<?php 
/**
 *function to view all task
 */
include "Tasks.php";
$obj = new Tasks();
$obj->viewTasks();
if (!($row = $obj->fetch())) {
    echo "there are no tasks currently";
}
/**
 *Setting a table to contain the contents of tasks objects
 */
echo "<table border='2'>";
echo "<tr><td>TASK ID</td><td>TASK NAME</td><td>TASK DESCRIPTION</td><td>START DATE</td>\n                 <td>END DATE</td><td>LOCATION</td></tr>";
while ($row) {
    echo "<tr><td>{$row["task_id"]}</td><td><a href=tasksdisplayselected.php?id=" . $row["task_name"] . ">{$row["task_name"]}</td>";
    echo "<td>{$row["task_description"]}</td><td>{$row["start_date"]}</td>\n                  <td>{$row["end_date"]}</td><td>{$row["location"]}</td>";
    $row = $obj->fetch();
}
echo "</table>";
?>
			</div>
开发者ID:rahabwairimu05,项目名称:Group10_NurseTaskManager,代码行数:31,代码来源:taskFunction.php

示例2: Tasks

 *COde standard: PSR
 *function to retrieve and display the tasks that have been assigned to nurses
 *The method fetches the details of the task
 *The method prints to screen an error message when query fails
 */
include_once "Tasks.php";
$obj = new Tasks();
$obj->displayAllTasks();
if (!($row = $objnurse->fetch())) {
    echo "There are no tasks currently";
}
/**
 *Creating code to display a table to contain the contents of tasks objects
 *
 *The details of the tasks that are printed in a table.
 *There's a loop that echoes the details of the task.
 *The loop steps through all the task and fetches in rows 
 */
echo "<center><table border='1'>";
echo "<tr><td>task_id</td><td>task_name</td><td>task_description</td><td>start_date</td>\n\t          <td>end_date</td><td>location</td></tr>";
while ($row) {
    echo "<tr><td>{$row['task_id']}</td><td>{$row['task_name']}</td><td>{$row['task_description']}</td>";
    echo "<td>{$row['start_date']}</td><td>{$row['end_date']}</td><td>{$row['location']}</td></tr>";
    $row = $obj->fetch();
}
echo "</table></center>";
?>
		</div>
	</body>
</html>
开发者ID:rahabwairimu05,项目名称:Group10_NurseTaskManager,代码行数:30,代码来源:taskFunctionNurse.php


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