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


PHP Query::whereCustom方法代码示例

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


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

示例1: setContent

 public function setContent()
 {
     $q = new Query("matruschka");
     $this->content = '<span class="style2">';
     $this->content .= 'copyright © 2009 Mats &Aring;berg | <a href="http://rocafuerte.se" target="self">rocafuerte design</a>' . "\n";
     $this->content .= '<br/><br/>';
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='SWE'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= '<a href="?ID=' . $q->getResultRow("mRowid") . '">Swedish</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='ENG'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">English</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='ITA'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">Italian</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='ESP'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">Spanish</a>';
     }
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='FRA'", "mRowid", "DESC", 1);
     if ($q->getResultRow("mPublished") == 1) {
         $this->content .= ' | <a href="?ID=' . $q->getResultRow("mRowid") . '">France</a>';
     }
     $this->content .= '</span>';
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:28,代码来源:Footer.class.php

示例2: setContent

 /**
  * Inenhåller menun som passar till Art
  * subkategprierna ordnas efter orderNo i matrushkan.
  */
 public function setContent()
 {
     $q = new Query("matruschkaShowAtPlaces");
     $q->showAt($this->title, $this->m->lang, "msapOrderNo", "ASC", 100);
     $i = 1;
     while ($row = mysql_fetch_object($q->getResult())) {
         $this->content .= '<div class="leftMenu">';
         $this->content .= '<span class="subSecTitle">' . $row->mButtonTitle . '</span>';
         $qq = new Query("matruschka");
         $qq->whereCustom("mButtonTitle, mRowid", "mParent = '" . $row->mRowid . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'  ", "mOrderNo", "ASC", 0);
         if ($qq->getNumRows()) {
             // om det finns nån som har denna som parent
             $this->content .= '<div class="subSection">';
             while ($row2 = mysql_fetch_object($qq->getResult())) {
                 /** Svart om aktiv **/
                 if ($this->getActive($this->m->ID, $row2->mRowid) == 1) {
                     $this->content .= '<span  class="sideMenuActive"><a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . '</a></span><br/>';
                 } else {
                     $this->content .= '<a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . '</a><br/>';
                 }
             }
             $this->content .= '</div>';
         }
         $this->content .= '</div>';
         if ($i != $q->getNumRows()) {
             $this->content .= '<img src="' . Settings::$graphics . 'stripes.gif" />' . "\n";
         }
         $i++;
     }
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:34,代码来源:ItaMenu.class.php

示例3: showContent

 /**
  * Denna kan se lite annorlunda ut eftersom det är en showStyle.
  * Det kanske inte innehåller specifik footer och header.
  */
 public function showContent()
 {
     $q = new Query("matruschka");
     $q->whereCustom("mRowid", "mShowStyle='Start' AND mLang='SWE'", "mRowid", "DESC", 1);
     $qq = new Query("matruschka");
     $qq->whereImage("mShowStyle='Agree' ", "ASC", 1);
     $ret = '<div id="self">';
     $ret .= '<div class="centerTextBox2"><img src="graphics/autograf.jpg" />';
     $ret .= "</div>\n";
     $ret .= '<div id="agree">';
     $ret .= '<img src="admin/' . Settings::$uploaded_images . '/' . $qq->getResultRow("miFilename") . '" width="250" alt="Agree"/>';
     $ret .= "</div>\n";
     $ret .= '<div class="centerTextBox">';
     $ret .= '<div class="alignRight">';
     $ret .= '<span class="style1"><em>';
     $ret .= $qq->getResultRow("imagesName");
     $ret .= "</em></span></div>\n";
     $ret .= '<p>';
     $ret .= '<span class="style1"><strong>';
     $ret .= '<br/>';
     $ret .= $qq->getResultRow("mText");
     $ret .= "</strong></span><br /><br />\n";
     $ret .= '<a href="?ID=' . $q->getResultRow("mRowid") . '" target="_self"><img src="graphics/agree.gif" width="74" height="15" border="0" /></a>';
     $ret .= "</p>\n";
     $ret .= "</div>\n";
     $ret .= "</div>\n";
     return $ret;
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:32,代码来源:SiteAgree.class.php

示例4: setHeader

 /**
  * Fyll i manuellt vad som ska vara i headern.
  */
 public function setHeader()
 {
     $q = new Query("matruschka");
     $q->whereCustom("mRowid", "mShowStyle='Start' AND mLang='" . $this->m->lang . "'", "mRowid", "DESC", 1);
     $this->header = '<div id="top"><a href="?ID=' . $q->getResultRow($mRowid) . '" >';
     $this->header .= '<img src="graphics/logo.gif" alt="Mats &Aring;berg" border="0" />';
     $this->header .= '</a>';
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:11,代码来源:Top.class.php

示例5: setContent

 /**
  * Inenhåller menun som passar till Art
  * subkategprierna ordnas efter orderNo i matrushkan.
  */
 public function setContent()
 {
     $q = new Query("matruschkaShowAtPlaces");
     $qq = new Query("matruschka");
     $qqq = new Query("matruschka");
     $q->showAt($this->title, $this->m->lang, "mOrderNo", "ASC", 100);
     $i = 1;
     while ($row = mysql_fetch_object($q->getResult())) {
         $this->content .= '<div class="leftMenu">';
         $this->content .= '<span class="subSecTitle">' . $row->mButtonTitle . "</span>\n";
         $qq->whereCustom("mButtonTitle, mRowid", "mParent = '" . $row->mRowid . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'  ", "mOrderNo", "ASC", 0);
         // om det finns nån som har denna som parent
         if ($qq->getNumRows()) {
             /* Fulhack för att få första i galleriet rosa */
             $i = 0;
             $this->content .= '<div class="subSection">';
             while ($row2 = mysql_fetch_object($qq->getResult())) {
                 $qqq->whereCustom("mButtonTitle, mRowid, mTitle", "mParent = '" . $row2->mRowid . "' \n                             AND mPublished='1' \n                             AND mButtonTitle NOT LIKE ''\n                             AND mLang='" . $this->m->lang . "'  ", "mOrderNo", "ASC", 0);
                 /** Om det är den trenivåare **/
                 if ($qqq->getNumRows()) {
                     $this->content .= '<span class="subSecTitle">' . $row2->mButtonTitle . "</span>\n";
                     $this->content .= '<div class="subSection">';
                     while ($row3 = mysql_fetch_object($qqq->getResult())) {
                         /** Rosa om aktiv **/
                         if ($this->getActive($this->m->ID, $row3->mRowid) == 1) {
                             $this->content .= '<span class="sideMenuActive"><a href="?ID=';
                             $this->content .= $row3->mRowid . '">' . $row3->mButtonTitle . "</a></span><br/>\n";
                         } else {
                             $this->content .= '<a href="?ID=' . $row3->mRowid . '">' . $row3->mButtonTitle . "</a><br/>\n";
                         }
                     }
                     $this->content .= "</div>\n";
                     // subSection inre
                 } else {
                     /** Om det är en vanlig blir det en länk**/
                     /** Rosa om aktiv **/
                     /** Fulhack - Rosa om man klickat på galleriet */
                     if ($this->getActive($this->m->ID, $row2->mRowid) == 1 || $this->m->showStyle == "Gallery" && $i == 0 && $this->m->level == 0) {
                         $this->content .= '<span class="sideMenuActive"><a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . "</a></span><br/>\n";
                     } else {
                         $this->content .= '<a href="?ID=' . $row2->mRowid . '">' . $row2->mButtonTitle . "</a><br/>\n";
                     }
                 }
                 /* Fulhack */
                 $i++;
             }
             $this->content .= "</div>\n";
             //subSection yttre
         }
         $this->content .= "</div>\n";
         // leftMenu
         if ($i != $q->getNumRows()) {
             $this->content .= '<img src="' . Settings::$graphics . 'stripes.gif" />' . "\n";
         }
         $i++;
     }
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:61,代码来源:LeftMenu.class.php

示例6: setMatruschka

 /**
  * Tilldelan matrushkan. Om inget ID finns så sätts den 
  * till de som man bestämt skall vara förstasidan.
  */
 private function setMatruschka()
 {
     if (eregi("^[0-9]{1,7}\$", $this->ID)) {
         $this->m = new Matruschka($this->ID);
     } else {
         $q = new Query('matruschka');
         $q->whereCustom("mRowid", "mShowStyle='Agree' AND mLang='SWE'", "mRowid", "DESC", 1);
         $this->m = new Matruschka($q->getResultRow("mRowid"));
     }
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:14,代码来源:Main.class.php

示例7: showContent

 /**
  * Denna kan se lite annorlunda ut eftersom det är in showStyle.
  * Det kanske inte innehåller secifikt footer och header.
  */
 public function showContent()
 {
     $q = new Query("matruschka");
     $q->whereCustom("*", "mShowStyle='Start' AND mLang='" . $this->m->lang . "' AND mPublished='1'", "mRowid", "DESC", 1);
     $ret = '<img src="graphics/start_pic.jpg" />';
     $ret .= '<div id="textBox1"><span class="style1">';
     $ret .= $q->getResultRow("mDescription");
     $ret .= '</span></div>';
     $ret .= '<div id="textBox2"><span class="style1">';
     $ret .= $q->getResultRow("mText");
     $ret .= '<div class="alignRight"><span class="style2"><strong>';
     $ret .= 'Mats &Aring;berg';
     $ret .= '</strong></span></div>';
     $ret .= '</div>';
     return $ret;
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:20,代码来源:SiteStart.class.php

示例8: Form

<form action="<?php 
$_SERVER['PHP_SELF'];
?>
" method="post">


<h2>Topp 40</h2>

Grupp - Album
<ol>
<?php 
$form = new Form();
$q = new Query("top40");
for ($i = 1; $i <= 40; $i++) {
    $q->whereCustom("*", "top40Username = '" . $_SESSION['admin_logged'] . "' AND top40ID = '{$i}' ", "top40ID", "ASC", 100);
    $group = htmlspecialchars($q->getResultRow("top40Group"), ENT_QUOTES);
    $album = htmlspecialchars($q->getResultRow("top40Album"), ENT_QUOTES);
    echo '<li>' . $form->textField("group[]", $group, "field") . " - " . $form->textField("album[]", $album, "field") . '</li>';
}
?>

</ol>

<input type="submit" name="action" value="Uppdatera"/>
</form>
<?php 
if ($_POST['action'] == "Uppdatera") {
    echo "Uppdaterat!";
}
echo '<br /><br /><a href="admin_personal.php">Tillbaka</a>';
开发者ID:rocafuerte,项目名称:opus,代码行数:30,代码来源:admin_top.php

示例9: while

    <?php 
    while ($row = mysql_fetch_object($prenQ->getResult())) {
        echo '<tr><td><a href="?id=' . $row->PrenId . '">' . $row->PrenToName . '</a></td>';
        echo '<td>' . $row->PrenToEmail . '</td>';
        echo '<td>' . $row->PrenRegisterDate . '</td>';
        echo '<td><b>' . $row->PrenFromNumber . '</b></td>';
        echo '<td><a href="admin_subscribers_action.php?action=remove&id=' . $row->PrenId . '&type=try"><img src="graphics/remove.jpg" alt="Ta bort" border="0" width="10"/></a></td></tr>';
    }
    ?>
</table>
<?php 
} else {
    if ($_GET['type'] == "year") {
        $prenQ = new Query("pren");
        // Doesnt escape '
        $prenQ->whereCustom("*", "PrenFromNumber = '0'", "PrenRegisterDate", "DESC", 10000000);
        ?>
<h4>1 &aring;rs prenumeranter</h4>
<table>
  <th align="left">Namn</th>
    <th align="left">E-mail</th>
    <th align="left">Datum</th>
    <th>&nbsp;</th>
    <?php 
        while ($row = mysql_fetch_object($prenQ->getResult())) {
            echo '<tr><td><a href="?id=' . $row->PrenId . '">' . $row->PrenToName . '</a></td>';
            echo '<td>' . $row->PrenToEmail . '</td>';
            echo '<td>' . $row->PrenRegisterDate . '</td>';
            echo '<td><a href="admin_subscribers_action.php?action=remove&id=' . $row->PrenId . '&type=year"><img src="graphics/remove.jpg" alt="Ta bort" border="0" width="10"/></a></td></tr>';
        }
        ?>
开发者ID:rocafuerte,项目名称:opus,代码行数:31,代码来源:admin_subscribers.php

示例10: Query

</p></span> </div>
		<div class="newsPicActual">
		<?php 
    echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . mysql_result($result, 0, "file") . '&width=512" alt="#' . mysql_result($result, 0, "number") . ' l&ouml;sning"/>';
    ?>
		 </div>
	
	<?php 
}
?>
<br/>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php 
$query = new Query(monthly_magazine);
$query->whereCustom("*", "crossword > 0", "number", "DESC", 1000);
$paging = new Paging($query, 30);
$paging->whereCustom();
while ($row = mysql_fetch_assoc($paging->getResult())) {
    echo '<tr>';
    echo '<td class="trBorderBottom" width="70">';
    echo '<span class="smallPink">';
    echo '#' . $row['number'];
    echo '</span>';
    echo '</td>';
    echo '<td class="trBorderBottom">';
    echo '<span class"smallGrey">';
    echo '<a href="?id=' . $row['rowid'] . '">';
    echo 'Korsordsl&ouml;sning';
    echo '</a>';
    echo '</span>';
开发者ID:rocafuerte,项目名称:opus,代码行数:31,代码来源:crossword.php


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