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


PHP Staff::selectAll方法代码示例

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


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

示例1: Staff

</head>
<body>
<form method="post" action="addstaffaccess.php" id="editform" role="form">
    <div class="modal-body">
        <div class="form-group">
            <label for="name">Access Code
                <input class="form-control" type="text" id="code" name="code"/>
            </label>
        </div>
        <div class="form-group">
            <label>Staff</label>
            <select class="form-control" name="staffid" id="staffid">

                <?php 
$staff = new Staff($db);
$stmt = $staff->selectAll();
while ($row_staff = $stmt->fetch(PDO::FETCH_ASSOC)) {
    extract($row_staff);
    echo "<option value='{$Id}'>{$FirstName} {$LastName}</option>";
}
?>
            </select>

        </div>
    </div>
    <div class="modal-footer">
        <input type="submit" class="btn btn-primary" name="add" value="Add" />&nbsp;
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    </div>
</form>
</body>
开发者ID:nathanashton,项目名称:GuestBook,代码行数:31,代码来源:addstaffaccess.php

示例2: Staff

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Staff Members</h3>
            </div>
            <div class="panel-body">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>First Name</th>
                        <th>Last Name</th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php 
$staffMember = new Staff($db);
$stmt = $staffMember->selectAll();
while ($row_staff = $stmt->fetch(PDO::FETCH_ASSOC)) {
    extract($row_staff);
    echo "<tr>";
    echo "<td>{$FirstName}</td>";
    echo "<td>{$LastName}</td>";
    echo "<td><a class='btn btn-small btn-primary' data-toggle='modal' data-target='#editModal' data-whatever='{$Id}'>Edit</a></td>";
    echo "</tr>";
}
?>

                    </tbody>
                </table>
            </div>
        </div>
    </div>
开发者ID:nathanashton,项目名称:GuestBook,代码行数:31,代码来源:staff.php

示例3: Staff

    <div class="modal-body">
        <div class="form-group">
            <label for="name">Access Code
                <input class="form-control" type="text" id="code" name="code" value="<?php 
echo $originalOption->Code;
?>
"/>
            </label>
        </div>
        <div class="form-group">
            <label>Staff</label>
            <select class="form-control" name="staffid" id="staffid">

                <?php 
$access = new Staff($db);
$stmt = $access->selectAll();
while ($row_access = $stmt->fetch(PDO::FETCH_ASSOC)) {
    extract($row_access);
    if ($originalOption->Staff_Id == $Id) {
        echo "<option value='{$Id}' selected='selected'>{$FirstName} {$LastName}</option>";
    } else {
        echo "<option value='{$Id}'>{$FirstName} {$LastName}</option>";
    }
}
?>
            </select>

        </div>
    </div>
    <div class="modal-footer">
        <input type="submit" class="btn btn-primary" name="update" value="Update" />&nbsp;
开发者ID:nathanashton,项目名称:GuestBook,代码行数:31,代码来源:editstaffaccess.php


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