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


PHP Query::getNumRows方法代码示例

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


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

示例1: 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

示例2: 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

示例3: __autoload

</head>
<?php 
if (!isset($_GET) || empty($_GET)) {
    print "<body style=\"background-color:#a9a9a9\">\n";
} else {
    print "<body>";
}
function __autoload($class_name)
{
    $directorys = array('php_classes/', 'php_classes/custom/admin/', 'php_classes/custom/site/');
    foreach ($directorys as $directory) {
        if (file_exists($directory . $class_name . '.class.php')) {
            require_once $directory . $class_name . '.class.php';
            return;
        }
    }
}
$db = new DB();
if (eregi("^[0-9]{1,4}\$", $_GET['ID'])) {
    $q = new Query("matruschka");
    $q->whereQuery("mRowid", "mRowid", $_GET['ID'], "mRowid", "ASC", 1);
    if ($q->getNumRows() > 0) {
        $ID = $_GET['ID'];
    }
}
/* Startar programmet */
new Main($ID);
?>
</body>
</html>
开发者ID:rocafuerte,项目名称:standard2,代码行数:30,代码来源:index.php

示例4: isset

<?php 
$pagesize = 40;
$recordstart = (int) $_GET['recordstart'];
$recordstart = isset($_GET['recordstart']) ? $_GET['recordstart'] : 0;
$query = "SELECT * FROM competitions\n\t\tORDER BY date DESC LIMIT " . $recordstart . " , " . $pagesize . " ";
$result = mysql_query($query) or die(mysql_error());
echo '<table cellpadding="3" cellspacing="2" border="0">';
echo '<th align="left">Titel</th><th align="left">Datum</th><th align="left">Skribent</th><th align="left">Svar</th><th align="left">Publicerad?</th><th>&nbsp;</th>';
while ($row = mysql_fetch_assoc($result)) {
    $answersQ = new Query("competition_answers");
    $answersQ->whereQuery("*", "answerComp_id", $row['rowid'], "answerRowid", "DESC", 100000);
    echo '<tr>
				<td align="left"><a href="admin_comp_edit.php?id=' . $row['rowid'] . '" class="klass1" > ' . $row['title'] . '</a></td>				
				<td align="left">' . $row['date'] . '</td>
				<td align="left">' . $row['published_by'] . '</td>
				<td align="left"><a href="admin_comp_answers.php?id=' . $row['rowid'] . '">' . $answersQ->getNumRows() . '</a></td>
				<td align="left">';
    if ($row['active'] == 1) {
        echo "JA";
    } else {
        echo "NEJ";
    }
    echo '</td>
				<td align="left"><a href="admin_comp_action.php?id=' . $row['rowid'] . '&action=remove"><img src="graphics/remove.jpg" width="10" border="0"/></a></td>
		  </tr>';
    $rad++;
}
?>
  </table>
<?php 
//alla aktuella
开发者ID:rocafuerte,项目名称:opus,代码行数:31,代码来源:admin_comp.php

示例5: Query

        }
        ?>
                </td>
                </tr>
                </table>
                <?php 
    }
    ?>
        
		 </div>
    <div class="mp3Player">
    
    <?php 
    $songs = new Query("demo_songs");
    $songs->whereQuery("*", "demo_id", $_GET['demo_id'], "demo_id", "ASC", 1);
    if ($songs->getNumRows() > 0) {
        ?>
  
			<embed src="jw_mp3_player/mp3player.swf" width="320" height="140" allowfullscreen="true" allowscriptaccess="always" flashvars="&file=jw_mp3_player/mysql_playlist_demo.php?demo_id=<?php 
        echo $_GET['demo_id'];
        ?>
&height=140&width=320&displaywidth=120" />
		<?php 
    }
    ?>
    
    </div>
    <div class="textContainer"><?php 
    echo Helper::text($query->getResultRow("text"));
    ?>
    <br /><br />
开发者ID:rocafuerte,项目名称:opus,代码行数:31,代码来源:demorecensioner.php

示例6: Query

		<hr class="hr2" noshade="noshade" />
		</div>
	<?php 
    }
}
$radioQ = new Query("radio_songs");
$radioQ->makeQuery("*", "rowid", "ASC", 1);
if ($radioQ->getNumRows() > 0) {
    ?>
	<div class="rightCenterDivFlow"><a href="#" onclick="MM_openBrWindow('radio.php','Radio','width=300,height=400,resizable=no')" ><img src="graphics/radio.gif" border="0" alt=""/></a></div>
	<hr class="hr2" noshade="noshade" /><br />
	<?php 
}
$demoQ = new Query("demos");
$demoQ->whereLeftJoinImageQuery("*", "week_demo", 1, "date", "DESC", 1);
if ($demoQ->getNumRows() > 0) {
    ?>
    <div class="rightCenterDivFlow"><a href="demorecensioner.php?demo_id=<?php 
    echo $demoQ->getResultRow("rowid");
    ?>
"><img src="graphics/veckansDemoband_title.gif" border="0" alt="Veckans demoband" /></a><br />
     <?php 
    if (Helper::hasValue($demoQ->getResultRow("image_id"))) {
        echo '<a href="demorecensioner.php?demo_id=' . $demoQ->getResultRow("rowid") . '" target="_self">';
        echo Image::displayImage($demoQ->getResultRow("file"), 198, "imgWhiteBorder", $demoQ->getResultRow("name"));
        echo '</a>';
    }
    ?>
  	<br />
    <span class="smallGrey"><a href="demorecensioner.php?demo_id=<?php 
    echo $demoQ->getResultRow("rowid");
开发者ID:rocafuerte,项目名称:opus_static,代码行数:31,代码来源:footer3.php

示例7: Query

      <hr class="hr2" noshade="noshade" />
    
      </div>
      
      <div class="leftCenterDivFlow">
       <span class="boldWhite">Kulturtips! </span><br /><br />
     <span class="smallGrey">
      Ta g&auml;rna en titt p&aring; några andra tidskrifter som vi p&aring;  gillar. Exempelvis <span class="smallOrange"><a href=http://www.tidningsbutiken.se/tidningen-denimzine.asp target=_blank>Denimzine</a></span>, <span class="smallOrange"><a href=http://www.tidningsbutiken.se/tidningen-ordfront.asp target=_blank>Ordfront</a></span>, <span class="smallOrange"><a href=http://www.tidningsbutiken.se/tidningen-vagabond.asp target=_blank>Vagabond</a></span> och <span class="smallOrange"><a href=http://www.tidningsbutiken.se/tidningen-zero-music-magazine.asp target=_blank>Zero Magazine</a></span>.<br/><i>i samarbete med <span class="smallOrange"><a href=http://www.tidningsbutiken.se target=_blank>tidningsbutiken.se</a></span></i></span>
      </div>
      </div>
</div>
<div id="centerContainer">
<?php 
$newest = new Query("new");
$newest->whereAndLeftJoinImageQuery("*", "active", 1, "date", "DESC");
if ($newest->getNumRows() > 0) {
    ?>
<div class="newestHeaderBig"></div>
<div class="newestBig">
  <table border="0" cellpadding="0" cellspacing="0" class="noBorder">
    <tr>
      <td width="80" class="noPadding" rowspan="3"><a href="index.php?id=<?php 
    echo $newest->getResultRow("rowid");
    ?>
"><img src="image_crop.php?source=<?php 
    echo Settings::getUploadedImages() . '/' . $newest->getResultRow("file");
    ?>
&dest=&thumb_size=100" class="imgWhiteBorder" /></a></td>
      <td width="450" class="tdPadding" colspan="2"><span class="boldWhite"><a href="index.php?id=<?php 
    echo $newest->getResultRow("rowid");
    ?>
开发者ID:rocafuerte,项目名称:opus_static,代码行数:31,代码来源:header_inc2.php

示例8: showTable2

 /**
  * Listar alla på förstasidan, dvs level=0
  */
 private function showTable2($class)
 {
     $q = new Query("matruschka");
     $q->whereQuery("*", "mLevel", 0, "mLang", "DESC", 0);
     echo '<br/><br/>';
     echo '<table class="' . $class . '" cellpadding="0" cellspacing="0">' . "\n";
     echo '<th>&nbsp;</th>';
     echo '<th>Title</th>';
     echo '<th>Sub cat´s</th>';
     echo '<th>Show style</th>';
     echo '<th>Order no.</th>';
     echo '<th>Lang</th>';
     echo '<th>Published</th>';
     //echo '<th align="left">Publiceringsdatum</th>';
     //echo '<th align="left">Senast uppdaterad</th>';
     //echo '<th align="left">Adminlevel</th>';
     echo '<th>&nbsp;</th>';
     echo '<th>&nbsp;</th>';
     $i = 0;
     while ($row = mysql_fetch_object($q->getResult())) {
         $ssThumb;
         $imgQ = new Query("matruschkaImages");
         $imgQ->whereQuery('*', 'miMatruschkaID', $row->mRowid, 'miMatruschkaID', 'DESC', 2);
         $img = $imgQ->getResultRow('miFilename');
         if ($row->mShowStyle == "ImageShow") {
             $ssThumb = AdminImageShow::$thumbnail;
         } elseif ($row->mShowStyle == "TextShow") {
             $ssThumb = AdminTextShow::$thumbnail;
         } elseif ($row->mShowStyle == "ImageShow2") {
             $ssThumb = AdminImageShow2::$thumbnail;
         } elseif ($row->mShowStyle == "Agree") {
             $ssThumb = AdminAgree::$thumbnail;
         } elseif ($row->mShowStyle == "Start") {
             $ssThumb = AdminStart::$thumbnail;
         }
         // Fyll på med fler
         echo "<tr>\n";
         echo '<td class="td' . $i . '"><img src="image_crop.php?source=' . Settings::getUploadedImages() . '/' . $img . '&dest=&thumb_size=40" /></td>' . "\n";
         echo '<td class="td' . $i . '">';
         if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) {
             echo '<a href="?ID=' . $row->mRowid . '">';
             echo $row->mButtonTitle ? $row->mButtonTitle : $row->mTitle;
             echo '</a>';
         } else {
             echo $row->mButtonTitle ? $row->mButtonTitle : $row->mTitle;
         }
         echo "</td>\n";
         echo '<td  class="td' . $i . '">';
         $subQ = new Query("matruschka");
         $subQ->whereQuery("mRowid", "mParent", $row->mRowid, "mRowid", "ASC", 0);
         echo $subQ->getNumRows();
         echo "</td>\n";
         echo "<td valign=\"bottom\" class=\"td{$i}\">";
         echo "<span onclick=\"MM_openBrWindow('" . Settings::$customGraphics . $ssThumb . "','Preview','width=500,height=500')\" style=\"cursor: hand; cursor: pointer;\">";
         echo $row->mShowStyle;
         echo '</span>';
         echo "</td>\n";
         echo '<td class="td' . $i . '">' . $row->mOrderNo . '</td>' . "\n";
         echo '<td class="td' . $i . '">' . $row->mLang . '</td>' . "\n";
         echo '<td class="td' . $i . '">';
         echo $row->mPublished ? '<span style="color:#339900">Yes</span>' : '<span style="color:#FF0000">No</span>';
         echo "</td>\n";
         //echo '<td valign="bottom">'.$row->mPubDate.'</td>'."\n";
         //echo '<td valign="bottom">'.$row->mUpdateDate.'</td>'."\n";
         //echo '<td valign="bottom">'.$row->mAdminLevel.'</td>'."\n";
         echo '<td class="td' . $i . '">';
         if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) {
             echo '<a href="?ID=' . $row->mRowid . '">Edit</a>';
         } else {
             echo '&nbsp;';
         }
         echo '</td>' . "\n";
         echo '<td class="td' . $i . '">';
         if ($_SESSION['admin_level'] >= $row->mAdminLevel || $_SESSION['admin_logged'] == $row->mAuthor) {
             echo '<a href="?action=Remove&mID=' . $row->mRowid . '&ID=' . $this->ID . '" name="removeButton">Remove</a>';
         } else {
             echo '&nbsp;';
         }
         echo '</td>' . "\n";
         echo '</tr>' . "\n";
         $i++;
         $i = $i % 2;
     }
     echo '</table>';
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:88,代码来源:MatruschkaGUI.class.php

示例9: newEntryPlace

 private function newEntryPlace()
 {
     echo "Skapat";
     $image = $_POST['image'];
     $title = $_POST['title'];
     $description = $_POST['description'];
     $parent = $_POST['parent'];
     $requiredTitle = $_POST['requiredTitle'];
     $requiredDescription = $_POST['requiredDescription'];
     $requiredText = $_POST['requiredText'];
     $requiredComments = $_POST['requiredComments'];
     $requiredImage = $_POST['requiredImage'];
     $requiredRate = $_POST['requiredRate'];
     $pubDate;
     if ($published == 1) {
         $pubDate = date("Y-m-d H:i:s");
     } else {
         $pubDate = "";
     }
     $q = new Query('entryPlaces');
     $q->whereQuery("*", "title", $title, "title", "DESC", 0);
     if ($q->getNumRows() == 0) {
         $query = "INSERT INTO entryPlaces \n\t\t\t\t\tSET image='{$image}',\n\t\t\t\t\t\ttitle='{$title}',\n\t\t\t\t\t\tdescription='{$description}',\n\t\t\t\t\t\tpubDate='{$pubDate}',\n\t\t\t\t\t\trequiredTitle='{$requiredTitle}',\n\t\t\t\t\t\trequiredDescription='{$requiredDescription}',\n\t\t\t\t\t\trequiredText='{$requiredText}',\n\t\t\t\t\t\trequiredComments='{$requiredComments}',\n\t\t\t\t\t\trequiredImage='{$requiredImage}',\n\t\t\t\t\t\trequiredRate='{$requiredRate}'";
         $result = mysql_query($query) or die(mysql_error());
     }
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:26,代码来源:ItemPlace.class.php

示例10: Query

"><?php 
    echo $demoQ->getResultRow("description");
    ?>
</a></span><br />
    <span class="smallOrange"><a href="demorecensioner.php?demo_id=<?php 
    echo $demoQ->getResultRow("rowid");
    ?>
">L&auml;s mer</a></span> <br />
    <br />
    <hr class="hr2" noshade="noshade" />
    </div>
<?php 
}
$radioQ = new Query("radio_songs");
$radioQ->makeQuery("*", "rowid", "ASC", 1);
if ($radioQ->getNumRows() > 0) {
    ?>
	<div class="rightCenterDivFlow"><a href="#" onclick="MM_openBrWindow('radio.php','Radio','width=300,height=400,resizable=no,toolbar=no,menubar=no,statusbar=no')" ><img src="graphics/radio.gif" border="0" alt=""/></a></div>
	<hr class="hr2" noshade="noshade" /><br />
	<?php 
}
?>
    
</div>
<div id="rightBannerDiv">
<!--<img src="graphics/annonspil.gif" alt="Annonser"/><br />-->
<?php 
$rightBannerQ = new Query("banners");
$rightBannerQ->whereLeftJoinImageQuery("*", "category", "right", "order_no", "ASC", 1);
while ($row = mysql_fetch_assoc($rightBannerQ->getResult())) {
    if (trim($row['bannersCode']) == "") {
开发者ID:rocafuerte,项目名称:opus,代码行数:31,代码来源:footer3.php


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