當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Requirements::find_by_sql方法代碼示例

本文整理匯總了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>
開發者ID:Ghaji,項目名稱:form_application,代碼行數:30,代碼來源:requrement_details.php

示例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>
開發者ID:Ghaji,項目名稱:form_application,代碼行數:31,代碼來源:view_admission_requirements.php

示例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 
開發者ID:Ghaji,項目名稱:form_application,代碼行數:31,代碼來源:index3.php


注:本文中的Requirements::find_by_sql方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。