本文整理汇总了PHP中Query::getResultRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Query::getResultRow方法的具体用法?PHP Query::getResultRow怎么用?PHP Query::getResultRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Query
的用法示例。
在下文中一共展示了Query::getResultRow方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listDemos
public function listDemos(Paging $paging){
while($row = mysql_fetch_assoc($paging->pagingResult)){
if($row['rowid']==$_GET['demo_id']) continue;
// Got to make a new query beacuse of error in mysql_fetch_assoc
$query = new Query($this->q->getTable());
$query->whereLeftJoinImageQuery("*","image_id",$row['image_id'],"rowid","ASC");
$image_id = $query->getResultRow("image_id");
$file_name=$query->getResultRow("file");
?>
<table border="0" cellpadding="0" cellspacing="0" class="demoTable">
<tr>
<?php
if(Helper::hasValue($image_id)){
?>
<td width="80" class="noPadding" rowspan="2"><img src="image_crop.php?source=<?php echo Settings::getUploadedImages().'/'.$file_name ?>&dest=&thumb_size=80" class="flowPic" /></td>
<?php
}
?>
<td width="270" class="tdPadding" colspan="2"><span class="boldGrey"><?php echo $row['name']; ?></span></td>
</tr>
<tr>
<td class="tdVertBottom"><span class="smallPink"><a href="?demo_id=<?php echo $row['rowid']; ?>">Läs mer</a></span></td>
<td align="right" class="tdVertBottom"><span class="smallGrey"><?php echo date("Y-m-d",strtotime($row['date'])); ?></span></td>
</tr>
</table>
<?
}
}
示例2: setContent
public function setContent()
{
$q = new Query("matruschka");
$this->content = '<span class="style2">';
$this->content .= 'copyright © 2009 Mats Å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>';
}
示例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;
}
示例4: showActual
public function showActual()
{
$id = (int) $_GET['id'];
if (Helper::givesResult($this->table, "rowid", $id)) {
$q = new Query($this->table);
$q->whereLeftJoinImageQuery("*", "rowid", $id, "rowid", "DESC");
$personal = new Query("personal");
$personal->whereQuery("*", "username", $q->getResultRow("published_by"), "rowid", "ASC", "1");
?>
<div class="newsHeader"><span class="dateAuthor">
<?php
echo date("Y-m-d", strtotime($q->getResultRow("date"))) . ' ' . $personal->getResultRow("first_name") . ' ' . $personal->getResultRow("last_name");
?>
</span><br /><br />
<span class="newsHeaderFont"><?php
echo $q->getResultRow("title");
?>
</span>
</div>
<div class="newsDescActual"><span class="boldGrey"><?php
echo nl2br(strip_tags($q->getResultRow("description"), '<a><b><br><strong>'));
?>
</span></div>
<div class="newsPicActual">
<?php
if ($q->getResultRow("image_id") > 0) {
?>
<table><tr><td>
<?php
echo '<img src="image_thumb.php?source=' . Settings::getUploadedImages() . '/' . $q->getResultRow("file") . '&width=340" alt="' . $q->getResultRow("name") . '" />';
?>
</td>
</tr>
<tr>
<td align="right" class="smallGrey2">
<?php
if ($q->getResultRow("photo") != "") {
echo '<span class="smallGrey">Foto: ' . $q->getResultRow("photo") . '</span>';
}
?>
</td>
</tr>
</table>
<?php
}
?>
</div>
<?php
echo nl2br(strip_tags($q->getResultRow("text"), '<a><b><br><strong>'));
?>
<br /><br />
<?php
}
}
示例5: getActive
private function getActive($id, $searched)
{
$q = new Query("matruschka");
$q->whereQuery("*", "mRowid", $id, "mRowid", "DESC", 0);
if ($q->getResultRow("mRowid") == $searched) {
return 1;
}
if ($q->getResultRow("mParent") == "") {
return 0;
} else {
return $this->getActive($q->getResultRow("mParent"), $searched);
}
}
示例6: 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 Åberg';
$ret .= '</strong></span></div>';
$ret .= '</div>';
return $ret;
}
示例7: setItems
public function setItems()
{
// Items at level
$date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s");
// Order number
$orderQ = new Query("matruschka");
if ($parent) {
$orderQ->whereQuery("mOrderNo", "mParent", $parent, 'mOrderNo', 'DESC', 1);
$order = $orderQ->getResultRow('mOrderNo') + 1;
} else {
$order = 1;
}
$orderNo = $this->matruschka ? $this->matruschka->orderNo : $order;
$this->items[0][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 200 x _ px", 1);
$this->items[0][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "KnappTitel (Mest för navigering i adminsidan)", 0);
$this->items[0][] = new ItemButtonImage($this->matruschka->ID, $this->matruschka->buttonImage, "Knappbild t.ex (bild1.gif,bild2.gif)", 0);
$this->items[0][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Text", 0);
$this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[0][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till menyraden.", 0);
$this->items[1][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0);
$this->items[1][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[1][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till vänstermenyn.", 0);
$this->items[2][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 200 x _ px", 1);
$this->items[2][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0);
$this->items[2][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[2][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Text (All text här)", 0);
$this->items[2][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[2][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till vänstermenyn.", 0);
}
示例8: setItems
public function setItems()
{
// Items at level
$date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s");
// Order number
$orderQ = new Query("matruschka");
if ($_GET['parent']) {
$orderQ->whereQuery("mOrderNo", "mParent", $_GET['parent'], 'mOrderNo', 'DESC', 1);
$order = $orderQ->getResultRow('mOrderNo') + 1;
} else {
$order = 1;
}
$orderNo = $this->matruschka ? $this->matruschka->orderNo : $order;
$this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0);
$this->items[0][] = new ItemButtonImage($this->matruschka->ID, $this->matruschka->buttonImage, "Knappbild", 0);
$this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[0][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till menyraden.", 0);
$this->items[1][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Översta rubriken, ", 0);
$this->items[1][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[1][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till rubriker.", 0);
$this->items[2][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[2][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Bildspelstitel", 0);
$this->items[2][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Texten", 0);
$this->items[2][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[2][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till bildspel.", 0);
$this->items[3][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[3][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild 400 x _ px ", 1);
$this->items[3][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[3][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer.", 0);
}
示例9: largeImg
private function largeImg()
{
$q = new Query("matruschka");
$q->whereImage("mRowid = '" . $this->m->ID . "' ", "ASC", 1);
$ret = '<div id="imageShow">';
if ($q->getResultRow("miFilename")) {
$ret .= '<img src="admin/' . Settings::$uploaded_images . '/' . $q->getResultRow("miFilename") . '" alt="' . $q->getResultRow("mTitle") . '" width="394"/>';
}
$ret .= '<br/>' . "\n";
$ret .= '<div id="imageInfo"><span class="imgTitle">' . $q->getResultRow("imagesName") . '</span><br/>' . "\n";
$ret .= '<span class="imgDesc">' . $q->getResultRow("mDescription") . '</span><br/>' . "\n";
$ret .= "</div>\n";
// imageInfo
$ret .= "</div>\n";
// imageShow
return $ret;
}
示例10: 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 Åberg" border="0" />';
$this->header .= '</a>';
}
示例11: 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"));
}
}
示例12: 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;
}
示例13: setItems
public function setItems()
{
// Items at level
$date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s");
// Order number
$orderQ = new Query("matruschka");
if ($parent) {
$orderQ->whereQuery("mOrderNo", "mParent", $parent, 'mOrderNo', 'DESC', 1);
$order = $orderQ->getResultRow('mOrderNo') + 1;
} else {
$order = 1;
}
$orderNo = $this->matruschka ? $this->matruschka->orderNo : $order;
$this->items[0][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 250 x _ px", 1);
$this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel. (För adminsidan)", 1);
$this->items[0][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten under bilden", 1);
$this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 1);
}
示例14: setItems
public function setItems()
{
// Items at level
$date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s");
// Order number
$orderQ = new Query("matruschka");
if ($parent) {
$orderQ->whereQuery("mOrderNo", "mParent", $parent, 'mOrderNo', 'DESC', 1);
$order = $orderQ->getResultRow('mOrderNo') + 1;
} else {
$order = 1;
}
$orderNo = $this->matruschka ? $this->matruschka->orderNo : $order;
$this->items[0][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[0][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Text till vänster", 0);
$this->items[0][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten till höger", 0);
$this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
}
示例15: setItems
public function setItems()
{
// Items at level
$date = $this->matruschka ? $this->matruschka->pubDate : date("Y-m-d H:i:s");
// Order number
$orderQ = new Query("matruschka");
if ($_GET['parent']) {
$orderQ->whereQuery("mOrderNo", "mParent", $_GET['parent'], 'mOrderNo', 'DESC', 1);
$order = $orderQ->getResultRow('mOrderNo') + 1;
} else {
$order = 1;
}
$orderNo = $this->matruschka ? $this->matruschka->orderNo : $order;
$this->items[0][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild 400 x _ px.", 1);
$this->items[0][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Rubriktitel (för navigering på adminsidan)", 0);
$this->items[0][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[0][] = new ItemButtonImage($this->matruschka->ID, $this->matruschka->buttonImage, "Knappbild (t.ex: bild1.gif,gid2.gif)", 0);
$this->items[0][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "", 0);
$this->items[0][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[0][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till menyraden.", 0);
$this->items[1][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Rubriktitel", 0);
$this->items[1][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[1][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Till vänstermenyn.", 0);
$this->items[2][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel", 0);
$this->items[2][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummerför underlänkarna i Menyn", 0);
$this->items[2][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[3][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 400px bred", 1);
$this->items[3][] = new ItemButtonTitle($this->matruschka->ID, $this->matruschka->buttonTitle, "Knapptitel (fyll endast i denna vid 3 nivåer)", 0);
$this->items[3][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[3][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Beskrivningen under bilden.", 0);
$this->items[3][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten bredvid bilden", 0);
$this->items[3][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[3][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Numret som man trycker på. Nolla läggs till automatisk. Vid 3 nivåer i menyn blir det ordningsnumret i menyn.", 0);
$this->items[4][] = new ItemImage($this->matruschka->ID, $this->matruschka->images, "Bild. 400px", 1);
$this->items[4][] = new ItemTitle($this->matruschka->ID, $this->matruschka->title, "Titel", 0);
$this->items[4][] = new ItemDescription($this->matruschka->ID, $this->matruschka->description, "Beskrivningen under bilden.", 0);
$this->items[4][] = new ItemText($this->matruschka->ID, $this->matruschka->text, "Texten bredvid bilden", 0);
$this->items[4][] = new ItemPublished($this->matruschka->ID, $this->matruschka->published, "Publicerad", 0);
$this->items[4][] = new ItemOrderNo($this->matruschka->ID, $orderNo, "Ordningsnummer. Numret som man trycker på. Nolla läggs till automatisk.", 0);
}