本文整理汇总了PHP中Lock::searchByOwner方法的典型用法代码示例。如果您正苦于以下问题:PHP Lock::searchByOwner方法的具体用法?PHP Lock::searchByOwner怎么用?PHP Lock::searchByOwner使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Lock
的用法示例。
在下文中一共展示了Lock::searchByOwner方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
include_once "../php/Lock.php";
$identification = $_REQUEST['identification'];
$locks = Lock::searchByOwner($identification);
foreach ($locks as $lock) {
$row = "<tr>" . "<td><input type='radio' name='locks' onchange='showCodes(selectLock())' value='" . $lock->serial() . "'></td>" . "<td>" . $lock->serial() . "</td>" . "<td>" . $lock->address() . "</td>" . "<td>" . $lock->model() . "</td>" . "</tr>";
echo $row;
}
示例2:
<div class="col-md-12">
<fieldset>
<legend>Locks</legend>
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Selection</th>
<th>Serial</th>
<th>Address</th>
<th>Model</th>
</tr>
</thead>
<tbody id='locks'>
<?php
$locks = Lock::searchByOwner($_SESSION['identification']);
$counter = 1;
foreach ($locks as $lock) {
$row = "<tr>" . "<td>" . $counter++ . "</td>" . "<td><input type='radio' name='locks' onchange='showCodes(selectLock())' value='" . $lock->serial() . "'></td>" . "<td>" . $lock->serial() . "</td>" . "<td>" . $lock->address() . "</td>" . "<td>" . $lock->model() . "</td>" . "</tr>";
echo $row;
}
?>
</tbody>
</table>
</fieldset>
</div>
</div>
</div>
</div>
<div class="section">
<div class="container">
示例3: myLocks
public function myLocks()
{
return Lock::searchByOwner($this->identification);
}