本文整理汇总了PHP中Requirements::find_by_sql方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirements::find_by_sql方法的具体用法?PHP Requirements::find_by_sql怎么用?PHP Requirements::find_by_sql使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requirements
的用法示例。
在下文中一共展示了Requirements::find_by_sql方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: customEncrypt
<?php
require_once "inc/initialize.php";
?>
<?php
$sql = "SELECT * FROM requirements ORDER BY `id` DESC ";
$require_contents = Requirements::find_by_sql($sql);
?>
<ul>
<?php
foreach ($require_contents as $require_content) {
?>
<li>
<a href='programs_details.php?id=<?php
echo customEncrypt($require_content->id);
?>
'>
<i class="icon-hand-right"></i> <?php
echo htmlentities($require_content->name);
?>
</a>
</li>
<?php
}
?>
</ul>
示例2: include_layout_template
<br>
<br>
<!-- Content -->
<div class="row-fluid">
<?php
include_layout_template('admin_menu.php');
?>
<div class="span9">
<h2>Program Requirements</h2>
<hr>
<?php
$query = "SELECT * FROM Requirements ORDER BY id DESC";
$result = Requirements::find_by_sql($query);
$pagecounter = 1;
$serialno = 1;
$max = 10;
$number_of_requirements = sizeof($result);
echo '<div class="tabbable">
<div class="tab-content">';
foreach ($result as $row) {
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>
示例3:
?>
Date: <i class="icon-calendar"></i> <?php
echo $item->created_time;
?>
</div>
<hr>
</p>
<?php
}
?>
<h3><i class="icon-certificate"></i> Admission Requirements</h3>
<ul>
<?php
$query1 = "SELECT * FROM requirements\r\n WHERE visible = 1\r\n AND name !='' \r\n ORDER BY id DESC \r\n Limit 3";
$requirements = Requirements::find_by_sql($query1);
foreach ($requirements as $prog) {
if ($prog->name != '') {
?>
<li>
<a href='#?id=<?php
echo $prog->id;
?>
'><?php
echo $prog->name;
?>
</a>
</li>
<?php