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


PHP Query::getResult方法代码示例

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


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

示例1: showContent

 /**
  * Denna kan se lite annorlunda ut eftersom det är in showStyle.
  * Det kanske inte innehåller secifikt footer och header.
  */
 public function showContent()
 {
     /* First Gallery start on klick on Gallery */
     if ($this->m->level == 0) {
         $q = new Query("matruschka");
         $q->whereImage("mParent='" . $this->m->ID . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'", "ASC", 1);
         $q->whereImage("mParent='" . $q->getResultRow("mRowid") . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'", "ASC", 1);
         $showID = $q->getResultRow("mRowid");
     } else {
         if ($this->m->level == 2) {
             $showID = $this->m->ID;
         }
     }
     $q = new Query("matruschka");
     $q->whereImage("mParent='" . $showID . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'", "ASC", 0);
     $qq = new Query("matruschka");
     $qq->whereImage("mRowid='" . $showID . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'", "ASC", 0);
     /* Main image */
     $ret = '<div id="pic">';
     while ($row = mysql_fetch_object($q->getResult())) {
         $ret .= '<img src="admin/' . Settings::$uploaded_images . '/' . $row->miFilename . '" alt="' . $row->imagesName . '"/>';
     }
     $ret .= '<div id="play">';
     $ret .= '<p>Click to pause</p>';
     $ret .= '<p style="display:none;">Click to play</p>';
     $ret .= '</div>';
     $ret .= '<div id="imageInfo">';
     $ret .= '<span class="style1">';
     $ret .= '<br/><br/>';
     $ret .= $qq->getResultRow("mDescription");
     $ret .= '</span">';
     $ret .= '</div>';
     //imageInfo
     $ret .= '</div>';
     //pic
     /* The thumbs */
     $ret .= '<div id="thumbs">';
     $x = 0;
     $q->whereImage("mParent='" . $showID . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'", "ASC", 0);
     while ($row = mysql_fetch_object($q->getResult())) {
         $class = $x % 2 == 1 ? "rightImg" : "";
         $ret .= '<img class="' . $class . '"src="admin/' . Settings::$uploaded_images . '/' . $row->miFilename . '" alt="' . $row->imagesName . '" />';
         $x++;
     }
     $ret .= '</div>';
     //thumbs
     return $ret;
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:52,代码来源:SiteGallery.class.php

示例2: setContent

 public function setContent()
 {
     $q = new Query("matruschkaShowAtPlaces");
     $q->showAt("Menubar", $this->m->lang, "mOrderNo", "ASC", 10);
     $a = array();
     $i = 0;
     while ($row = mysql_fetch_object($q->getResult())) {
         // Get the id and image
         $a[$i][0] = $row->mRowid;
         $a[$i][1] = $row->mButtonTitle;
         $a[$i][2] = $row->mButtonImage;
         $i++;
     }
     for ($i = 0; $i < count($a); $i++) {
         $im = split(',', $a[$i][2]);
         $this->content .= '<span class="menuItem">' . "\n";
         $this->content .= "<a href=\"?ID=" . $a[$i][0] . "\" onmouseout=\"MM_swapImgRestore()\" onmouseover=\"MM_swapImage('" . $im[1] . "','','" . Settings::$graphics . "menu/" . $this->m->lang . "/" . $im[1] . "',1)\">";
         // Den man är inne på blir röd
         $image = $this->getActive($this->m->ID, $a[$i][0]) ? $im[1] : $im[0];
         $this->content .= '<img src="' . Settings::$graphics . 'menu/' . $this->m->lang . '/' . $image . '" alt="' . $im[1] . '" name="' . $im[1] . '"  border="0" id="' . $im[1] . '" />';
         $this->content .= '</a>';
         if ($i < count($a) - 1) {
             $this->content .= '<img src="' . Settings::$graphics . 'menu/' . $this->m->lang . '/stripe.gif" width="7" height="12" />';
         }
         $this->content .= "</span>\n";
     }
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:27,代码来源:SiteMenubar.class.php

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

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

示例5: closeupVimmelThumbs

    public function closeupVimmelThumbs(Query $query, $width)
    {
        while ($row = mysql_fetch_object($query->getResult())) {
            ?>
	
			<div class="thumbnail"> 
          <?php 
            echo '<a href="?id=' . $row->rowid . '&category=' . $_GET['category'] . '">';
            echo '<img src="image_crop.php?source=' . Settings::getUploadedImages() . '/' . $row->file . '&dest=&thumb_size=' . $width . '" alt="' . $row->name . '" />';
            ?>
          </a>    
          </div>
		  <?php 
        }
    }
开发者ID:rocafuerte,项目名称:opus,代码行数:15,代码来源:ShowImages.class.php

示例6: isPlay

function isPlay($idJoueur, $idTournoi, $database)
{
    $sql_func = 'SELECT * FROM joueurtournoi WHERE id_joueur = :id_joueur AND id_tournoi = :id_tournoi';
    $query_func = new Query($database, $sql_func);
    $query_func->bind(':id_joueur', $idJoueur, PDO::PARAM_INT);
    $query_func->bind(':id_tournoi', $idTournoi, PDO::PARAM_INT);
    if ($query_func->execute()) {
        $jeux = $query_func->getResult();
    }
    if (empty($jeux)) {
        //ne joue pas a ce jeux
        return 0;
    } else {
        //joue a ce jeux
        return 1;
    }
}
开发者ID:HehLan,项目名称:Intranet-5.0,代码行数:17,代码来源:registrations.php

示例7: listEntryPlaces

    public function listEntryPlaces($class)
    {
        $entryPlaces = new Query("entryPlaces");
        $entryPlaces->makeQuery("*", "pubDate", "DESC", 0);
        echo '<table class="' . $class . '">';
        echo '<th align="left">Titel</th><th align="left">Beskrivning</th>
				<th align="left">Uppdaterad senast</th><th align="left">&Auml;ndra</th><th align="left">Ta bort</th>';
        while ($row = mysql_fetch_object($entryPlaces->getResult())) {
            echo '<tr>
			<td>' . strip_tags($row->title) . '</td>
			<td>' . strip_tags($row->description) . '</td>				
			<td>' . $row->updateDate . '</td>
			<td><a href="?action=edit&entryPlaceTitle=' . $row->title . '">&Auml;ndra</a></td>
			<td><a href="?action=delete&entryPlaceTitle=' . $row->title . '">Ta bort</a></td>
			</tr>';
        }
        echo '</table>';
    }
开发者ID:rocafuerte,项目名称:standard2,代码行数:18,代码来源:ItemPlace.class.php

示例8: 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->whereImage("mParent='" . $this->m->ID . "' AND mPublished='1' AND mLang='" . $this->m->lang . "'", "DESC", 3);
     $qq = new Query("matruschka");
     $ret;
     while ($row = mysql_fetch_object($q->getResult())) {
         $ret .= '<table width="211" border="0" cellpadding="0" cellspacing="0" class="tableLeft">';
         $ret .= '<tr><td colspan="2" class="title2">' . $row->mTitle . '</td></tr>';
         $ret .= '<tr><td colspan="2" class="title2">';
         $ret .= '<img src="admin/' . Settings::$uploaded_images . '/' . $row->miFilename . '" width="210" height="160" />';
         $ret .= '</td>';
         $ret .= '</tr>';
         $qq->whereImage("mParent='" . $row->mRowid . "' AND mPublished='1'", "ASC", 0);
         while ($row2 = mysql_fetch_object($qq->getResult())) {
             $ret .= '<tr>';
             $ret .= '<td width="77"><span class="style1"><strong>' . $row2->mTitle . '</strong></span></td>';
             $ret .= '<td width="134"><span class="style1">' . $row2->mText . '</span></td>';
             $ret .= '</tr>';
         }
         $ret .= "</table>\n";
     }
     return $ret;
 }
开发者ID:rocafuerte,项目名称:standard2,代码行数:28,代码来源:SiteContact.class.php

示例9: Query

<?php

// Created by Ian Santagata
// Test script to test MySQL PHP interaction
// Feel free to edit and test for your own needs
include "Query.php";
$q = new Query("SELECT * FROM gstate");
$q->execute();
$result = $q->getResult();
for ($i = 0; $i <= 8; $i++) {
    $row = $q->getRow($i);
    printf("Coordinate: %s Username: %s\n", $row[0], $row[1]);
}
开发者ID:dpsyche,项目名称:Tic-Tac-Toe,代码行数:13,代码来源:test.php

示例10: Query

        echo 'ERREUR SQL TOURNOI';
    }
    exit;
}
$jpt = $tournoi['joueurParTeam'];
$sql = 'SELECT id_match as id,nbr_manche,teamParMatch as tpm FROM matchs WHERE id_tournoi=:idt AND id_groupe IS NULL';
$query = new Query($database, $sql);
$query->bind('idt', $id_tournoi, PDO::PARAM_INT);
if (!$query->execute()) {
    global $glob_debug;
    if ($glob_debug) {
        echo 'ERREUR SQL MATCHS';
    }
    exit;
} else {
    $matchs = $query->getResult();
}
if ($jpt > 1) {
    foreach ($matchs as $match) {
        if (isset($_POST['m_' . $match['id'] . '_1'])) {
            $sql = 'DELETE FROM manches_equipes WHERE id_match=:idm';
            $query = new Query($database, $sql);
            $query->bind('idm', $match['id'], PDO::PARAM_INT);
            if (!$query->execute()) {
                global $glob_debug;
                if ($glob_debug) {
                    echo 'ERREUR SQL DELETE MANCHE_EQUIPE';
                }
                exit;
            }
            $sql = 'DELETE FROM matchs_equipes WHERE id_match=:idm';
开发者ID:HehLan,项目名称:Intranet-5.0,代码行数:31,代码来源:finale_save.php

示例11: Query

<?php

require_once 'common/head_admin.php';
// Database Queries
$locations = $database->getLocations();
$locations_1 = $database->getLocations_1();
$players = $database->getLogins();
$teams = $database->getTeams();
// Selection des pseudos => mais pourquoi ça existe?
$sql = 'SELECT pseudo FROM joueurs ORDER BY pseudo ASC';
$query = new Query($database, $sql);
$query->execute();
$joueurs_autre = $query->getResult();
// send to the template
$smarty->assign("emplacements", $locations);
$smarty->assign("emplacements1", $locations_1);
$smarty->assign('joueurs', $players);
$smarty->assign('equipes', $teams);
$smarty->assign('joueurs_autre', $joueurs_autre);
$smarty->display(DOCUMENT_ROOT . '/view/templates/admin/emplacements.tpl');
开发者ID:HehLan,项目名称:Intranet-5.0,代码行数:20,代码来源:emplacements.php

示例12: Database

session_start();
require_once '../common/var.conf.php';
require_once DOCUMENT_ROOT . '/common/utils.php';
require_once DOCUMENT_ROOT . '/class/Smarty_HEHLan.class.php';
require_once DOCUMENT_ROOT . '/class/Database.class.php';
require_once DOCUMENT_ROOT . '/class/Auth.class.php';
require_once DOCUMENT_ROOT . '/class/Query.class.php';
$connected = false;
$allowed = false;
$chatIsActive = false;
$database = new Database();
$smarty = new Smarty_HEHLan();
$connected = Auth::isLogged();
$allowed = Auth::isAllowed(3);
if (!$connected && !$allowed) {
    header('Location: ../index.php');
}
$sql = 'SELECT id_joueur, pseudo FROM joueurs ORDER BY pseudo';
$query = new Query($database, $sql);
if ($query->execute()) {
    $joueurs = $query->getResult();
} else {
    echo 'ERROR';
    exit;
}
// send to the template
$smarty->assign("con", $connected);
$smarty->assign("chat", $chatIsActive);
$smarty->assign('joueurs', $joueurs);
$smarty->display(DOCUMENT_ROOT . '/view/templates/admin/joueurs.tpl');
开发者ID:HehLan,项目名称:Intranet-5.0,代码行数:30,代码来源:joueurs.php

示例13: Query

	  <?php 
    }
    ?>
	  <br />
	  <br />  
		  <div class="thumbnailContainer">
			<?php 
    if (Helper::isInt($_GET['category'])) {
        $query = new Query("vimmel_images");
        $query->whereLeftJoinImageQuery("*", "category", $_GET['category'], "date", "DESC");
        // Dont forget the Javascript (effect.js)!!!
        $images = new ShowImages($query);
        $images->closeupVimmelThumbs($query, 50);
    }
    ?>
		  </div>
		  
	  <?php 
}
// if(isset($_GET['category']) end
$categories = new Query("vimmel_categories");
$categories->makeQuery("*", "date", "DESC", 10000);
echo '<span class="boldPink">Bildgalleri</span><span class="smallWhite"></span><br /><br />';
while ($row = mysql_fetch_object($categories->getResult())) {
    echo '<span class="boldWhite"><a href="?category=' . $row->rowid . '">' . $row->title . '</a></span><br /><br />';
}
?>
  </div>
  </div>
<?php 
include "footer.php";
开发者ID:rocafuerte,项目名称:opus_static,代码行数:31,代码来源:vimmel.php

示例14: SUM

            } else {
                $finale = $match['id_match'];
            }
        }
        $nbrmatch++;
        $sql2 = 'SELECT mte.id_equipe, e.nom, (SELECT SUM(ma.score)
                FROM manches_equipes AS ma 
                WHERE ma.id_match=:idm AND ma.id_equipe=mte.id_equipe
                GROUP BY ma.id_equipe) AS score
                FROM matchs_equipes AS mte, equipes AS e 
                WHERE mte.id_match=:idm AND e.id_equipes=mte.id_equipe';
        $query2 = new Query($database, $sql2);
        $query2->bind(':idm', $match['id_match'], PDO::PARAM_INT);
        if ($query2->execute()) {
            $cpt = 1;
            foreach ($query2->getResult() as $team) {
                $matches[$match['id_match']][$cpt]['id'] = $team['id_equipe'];
                $matches[$match['id_match']][$cpt]['nom'] = $team['nom'];
                $matches[$match['id_match']][$cpt]['score'] = $team['score'];
                $cpt++;
            }
        } else {
            global $glob_debug;
            if ($glob_debug) {
                echo 'ERREUR SQL TEAMS';
            }
            exit;
        }
    }
} else {
    global $glob_debug;
开发者ID:HehLan,项目名称:Intranet-5.0,代码行数:31,代码来源:finalesPools.php

示例15: Query

        }
    }
} else {
    global $glob_debug;
    if ($glob_debug) {
        echo 'ERREUR SQL MAPS';
    }
    exit;
}
$phase;
// determiner la phase du pick
$sql = "SELECT idMap FROM matchs WHERE id_match=:idMatch";
$query = new Query($database, $sql);
$query->bind(':idMatch', $matchId, PDO::PARAM_INT);
if ($query->execute()) {
    $idMap = $query->getResult()[0]['idMap'];
    if ($idMap == 0) {
        // on est tjs au stade de pick les maps
        $phase = "maps";
    } else {
        $phase = "heroes";
    }
} else {
    global $glob_debug;
    if ($glob_debug) {
        echo 'ERREUR SQL MAPS';
    }
    exit;
}
// ********************** Applying Template **********************
$smarty->assign('con', $connected);
开发者ID:HehLan,项目名称:Intranet-5.0,代码行数:31,代码来源:pick.php


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