本文整理汇总了PHP中getResult函数的典型用法代码示例。如果您正苦于以下问题:PHP getResult函数的具体用法?PHP getResult怎么用?PHP getResult使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getResult函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: processing
function processing()
{
global $sModule;
global $sFfmpegPath;
global $sModulesPath;
global $sFilesPath;
$iFilesCount = getSettingValue($sModule, "processCount");
if (!is_numeric($iFilesCount)) {
$iFilesCount = 2;
}
$iFailedTimeout = getSettingValue($sModule, "failedTimeout");
if (!is_numeric($iFailedTimeout)) {
$iFailedTimeout = 1;
}
$iFailedTimeout *= 86400;
$sDbPrefix = DB_PREFIX . ucfirst($sModule);
$iCurrentTime = time();
//remove all tokens older than 10 minutes
getResult("DELETE FROM `" . $sDbPrefix . "Tokens` WHERE `Date`<'" . ($iCurrentTime - 600) . "'");
getResult("UPDATE `" . $sDbPrefix . "Files` SET `Date`='" . $iCurrentTime . "', `Status`='" . VC_STATUS_FAILED . "' WHERE `Status`='" . VC_STATUS_PROCESSING . "' AND `Date`<'" . ($iCurrentTime - $iFailedTimeout) . "'");
$rResult = getResult("SELECT * FROM `" . $sDbPrefix . "Files` WHERE `Status`='" . VC_STATUS_PENDING . "' ORDER BY `ID` LIMIT " . $iFilesCount);
for ($i = 0; $i < mysql_num_rows($rResult); $i++) {
$aFile = mysql_fetch_assoc($rResult);
if (!_convert($aFile['ID'])) {
getResult("UPDATE `" . $sDbPrefix . "Files` SET `Status`='" . VC_STATUS_FAILED . "' WHERE `ID`='" . $aFile['ID'] . "'");
}
}
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:28,代码来源:BxDolCronVideoComments.php
示例2: getBlockedUsers
function getBlockedUsers($sBlockerId)
{
$aUsers = array();
$rResult = getResult("SELECT `Profile` FROM `sys_block_list` WHERE `ID`='" . $sBlockerId . "'");
while ($aUser = mysql_fetch_assoc($rResult)) {
$aUsers[] = $aUser['Profile'];
}
return $aUsers;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:9,代码来源:customFunctions.inc.php
示例3: processing
function processing()
{
global $sModule;
global $sFfmpegPath;
global $sModulesPath;
global $sFilesPath;
$iFilesCount = getSettingValue($sModule, "processCount");
if (!is_numeric($iFilesCount)) {
$iFilesCount = 2;
}
$iFailedTimeout = getSettingValue($sModule, "failedTimeout");
if (!is_numeric($iFailedTimeout)) {
$iFailedTimeout = 1;
}
$iFailedTimeout *= 86400;
$sDbPrefix = DB_PREFIX . ucfirst($sModule);
$iCurrentTime = time();
do {
//remove all tokens older than 10 minutes
if (!getResult("DELETE FROM `" . $sDbPrefix . "Tokens` WHERE `Date`<'" . ($iCurrentTime - 600) . "'")) {
break;
}
if (!getResult("UPDATE `" . $sDbPrefix . "Files` SET `Date`='" . $iCurrentTime . "', `Status`='" . STATUS_FAILED . "' WHERE `Status`='" . STATUS_PROCESSING . "' AND `Date`<'" . ($iCurrentTime - $iFailedTimeout) . "'")) {
break;
}
$rResult = getResult("SELECT * FROM `" . $sDbPrefix . "Files` WHERE `Status`='" . STATUS_PENDING . "' ORDER BY `ID` LIMIT " . $iFilesCount);
if (!$rResult) {
break;
}
for ($i = 0; $i < mysql_num_rows($rResult); $i++) {
$aFile = mysql_fetch_assoc($rResult);
if (convertVideo($aFile['ID'])) {
$sType = 'bx_videos';
//album counter & cover update
if (getSettingValue($sModule, "autoApprove") == TRUE_VAL) {
$oAlbum = new BxDolAlbums($sType);
$oAlbum->updateObjCounterById($aFile['ID']);
if (getParam($oAlbum->sAlbumCoverParam) == 'on') {
$oAlbum->updateLastObjById($aFile['ID']);
}
}
//tags & categories parsing
$oTag = new BxDolTags();
$oTag->reparseObjTags($sType, $aFile['ID']);
$oCateg = new BxDolCategories($aFile['Owner']);
$oCateg->reparseObjTags($sType, $aFile['ID']);
} else {
if (!getResult("UPDATE `" . $sDbPrefix . "Files` SET `Status`='" . STATUS_FAILED . "' WHERE `ID`='" . $aFile['ID'] . "'")) {
break;
}
}
}
} while (false);
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:54,代码来源:BxDolCronVideo.php
示例4: contactInfo
function contactInfo($db, $call)
{
$contacts = '';
$q3 = "SELECT contact, validity " . "FROM ares_contact_info " . "WHERE `type` = 4 AND `call`='" . $call . "'";
//echo "<p>[" . $q3 . "]</p>\n";
$r3 = getResult($q3, $db);
if ($row3 = getRow($r3, $db)) {
$contacts = $row3[0];
}
echo $contacts . ", ";
}
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:11,代码来源:ECmaillist.php
示例5: deleteFile
/**
* Delete file
* @param $sFile - file identificator
* @return $bResult - result of operation (true/false)
*/
function deleteFile($sFile)
{
global $sFilesPath;
getResult("DELETE FROM `" . MODULE_DB_PREFIX . "Files` WHERE `ID`='" . $sFile . "'");
getResult("DELETE FROM `" . MODULE_DB_PREFIX . "PlayLists` WHERE `FileId`='" . $sFile . "'");
parseTags($sFile);
$sFileName = $sFilesPath . $sFile;
$bResult = @unlink($sFileName . PLAY_EXTENSION);
$bResult = @unlink($sFileName . SAVE_EXTENSION);
$bResult = @unlink($sFileName . IMAGE_EXTENSION);
return $bResult;
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:17,代码来源:functions.inc.php
示例6: post
function post($sTable, $sId, $sAuthor, $sParent, $sMood, $sFileId)
{
global $sIncPath;
global $sModule;
global $sHomeUrl;
require $sIncPath . "content.inc.php";
$sText = getEmbedCode($sModule, "player", array('id' => $sFileId, 'file' => TRUE_VAL));
$sText = str_replace($sHomeUrl, "[ray_url]", $sText);
$sSql = "INSERT INTO `" . $sTable . "`(`cmt_parent_id`, `cmt_object_id`, `cmt_author_id`, `cmt_text`, `cmt_mood`, `cmt_time`) VALUES('" . $sParent . "', '" . $sId . "', '" . $sAuthor . "', '" . $sText . "', '" . $sMood . "', NOW())";
getResult($sSql);
return getLastInsertId();
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:12,代码来源:customFunctions.inc.php
示例7: updateCascade
function updateCascade($cascade, $auth, $blockID, $xmlData)
{
$id = array('id' => $blockID, 'type' => 'block');
$readParams = array('authentication' => $auth, 'identifier' => $id);
$blockRead = $cascade->read($readParams);
$asset = $blockRead->readReturn->asset->xmlBlock;
$asset->xml = $xmlData;
$editParams = array('authentication' => $auth, 'asset' => array('xmlBlock' => $asset));
$cascade->edit($editParams);
$result = $cascade->__getLastResponse();
getResult($result, $asset->name);
}
开发者ID:ajanckila,项目名称:Cascade-Web-Services-Examples,代码行数:12,代码来源:importAcalog.php
示例8: post
function post($sTable, $sId, $sAuthor, $sParent, $sMood, $sFileId)
{
global $sIncPath;
global $sModule;
global $sHomeUrl;
$sText = getEmbedCode($sModule, "player", array('id' => $sFileId));
$sText = str_replace($sHomeUrl, "[ray_url]", $sText);
$sSql = "INSERT INTO `" . $sTable . "`(`cmt_parent_id`, `cmt_object_id`, `cmt_author_id`, `cmt_text`, `cmt_mood`, `cmt_time`) VALUES('" . $sParent . "', '" . $sId . "', '" . $sAuthor . "', '" . $sText . "', '" . $sMood . "', NOW())";
getResult($sSql);
$iCommentId = getLastInsertId();
getResult("UPDATE `" . MODULE_DB_PREFIX . "Files` SET `Description`='" . $iCommentId . "' WHERE `ID`='" . $sFileId . "'");
return $iCommentId;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:13,代码来源:customFunctions.inc.php
示例9: getResult
function getResult($dir, &$retArray)
{
foreach (glob($dir . "/*") as $filePath) {
if (is_dir($filePath)) {
array_push($retArray, '<li data-options="attributes:{file_path:\'\'}, state:\'closed\'">');
array_push($retArray, '<span>' . basename($filePath) . '</span>');
array_push($retArray, '<ul>');
getResult($filePath, $retArray);
array_push($retArray, '</ul>');
array_push($retArray, '</li>');
} else {
array_push($retArray, '<li data-options="attributes:{file_path:\'' . $filePath . '\'}">');
array_push($retArray, '<span>' . basename($filePath) . '</span>');
array_push($retArray, '</li>');
}
}
}
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:17,代码来源:util.php
示例10: contactInfo
function contactInfo($db, $call)
{
$contacts = '';
$q3 = "SELECT ares_contact_type, contact, validity, A.type " . "FROM ares_contact_info A, ares_contact_type B " . "WHERE A.type = B.type AND A.call='" . $call . "'";
//echo "<p>" . $q3 . ",/p>\n";
$r3 = getResult($q3, $db);
while ($row3 = getRow($r3, $db)) {
$xx = $row3[1];
if ($row3[3] < 4) {
$xx = formatNumber($row3[1]);
}
if ($row3[2] == 1) {
$contacts = $contacts . $row3[0] . ": <b>" . $xx . "</b><br>";
} else {
$contacts = $contacts . $row3[0] . ": " . $xx . "<br>";
}
}
echo $contacts;
}
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:19,代码来源:ECcontact.php
示例11: getOnline
/**
* get online users
* @param aRange - users IDs range to select from
* @param $bInRange - get users that in(not in) range
*/
function getOnline($aRange = array(), $bInRange = true)
{
require_once BX_DIRECTORY_PATH_INC . "db.inc.php";
$iMin = getParam("member_online_time");
$sInRange = $bInRange ? "IN" : "NOT IN";
$sWhere = " WHERE `UserStatus`!='" . USER_STATUS_OFFLINE . "' AND `DateLastNav`>SUBDATE(NOW(), INTERVAL " . $iMin . " MINUTE) ";
if (isset($aRange) && count($aRange) > 0) {
$sQuery = "SELECT `ID` FROM `Profiles`" . $sWhere . "AND `ID` " . $sInRange . " (" . implode(",", $aRange) . ") ORDER BY `ID`";
} else {
$sQuery = "SELECT `ID` FROM `Profiles`" . $sWhere . "ORDER BY `ID`";
}
$rOnline = getResult($sQuery);
$aOnline = array();
while ($aUser = mysql_fetch_array($rOnline)) {
$aOnline[] = $aUser['ID'];
}
return $aOnline;
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:23,代码来源:apiFunctions.inc.php
示例12: removeFile
function removeFile($sFileId)
{
global $sFilesPath;
@getResult("DELETE FROM `" . MODULE_DB_PREFIX . "Messages` WHERE `ID`='" . $sFileId . "'");
@unlink($sFilesPath . $sFileId . ".file");
}
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:6,代码来源:functions.inc.php
示例13: define
}
if (!defined('CURRENT_CATEGORY')) {
define('CURRENT_CATEGORY', 'athletica_tech');
}
if (!defined('CURRENT_PAGE')) {
define('CURRENT_PAGE', 'results');
}
require_once ROOT_PATH . 'lib/inc.init.php';
require_once ROOT_PATH . 'lib/cls.result_tech.php';
$events = getEvents(CFG_CURRENT_MEETING, CFG_CURRENT_EVENT);
$type = $glb_types_results[$events['disc_type']];
$wind = $events['event_wind'];
$result_id = $_GET['result'];
$athlete_id = $_GET['athlete'];
$attempt = $_GET['attempt'];
$result = getResult($result_id);
$athlete = getAthleteDetails($athlete_id, false, 'ath_pos', 0, true);
?>
<script type="text/javascript">
$(document).ready(function(){
$('button').button();
$('#result_edit_result, #result_edit_wind').keyup(function(){
validate();
});
$('#result_edit_result').blur(function(){
var res = $(this).val();
if (res) {
$.ajax({
开发者ID:laiello,项目名称:athletica,代码行数:31,代码来源:dialog_edit_input.php
示例14: MAX
$Q2 = "SELECT MAX(`PERIOD`) FROM `arpsc_ecrept` " . "WHERE `county`='" . $row1[0] . "'";
$last = singleResult($Q2, $db);
$Q3 = "SELECT `ARESMEM` FROM `arpsc_ecrept` " . "WHERE `COUNTY`='" . $row1[0] . "' " . "AND `PERIOD`=" . $last;
$latest = singleResult($Q3, $db);
$Q4 = "SELECT `ARESMEM` FROM `arpsc_ecrept` " . "WHERE `COUNTY`='" . $row1[0] . "' " . "AND `PERIOD`=0";
$zeroth = singleResult($Q4, $db);
echo "<p>" . $row1[0] . ": " . $last . ", ";
if ($latest == $zeroth) {
echo $latest . ", " . $zeroth . "</p>\n";
} else {
if ($zeroth > 0) {
echo "<b>" . $latest . ", " . $zeroth . "</b><br/>\n";
$Q5 = 'UPDATE `arpsc_ecrept` SET `ARESMEM`=' . $latest . " WHERE `COUNTY`='" . $row1[0] . "' AND `PERIOD`=0";
echo "---" . $Q5 . "---</p>\n";
$R5 = getResult($Q5, $db);
} else {
echo "<span style=\"color: red;\">" . $latest . ", " . $zeroth . "</span><br />\n";
$Q5 = "INSERT INTO `arpsc_ecrept` (PERIOD,COUNTY,ARESMEM,UPDATED) " . "VALUES(0,'" . $row1[0] . "'," . $latest . ",NOW());";
echo "---" . $Q5 . "---</p>\n";
$R5 = getResult($Q5, $db);
}
}
}
echo " </div>\n";
sectLeaders($db);
footer($starttime, "2010-11-11", "\$Revision: 1.1 \$ - \$Date: 2010-11-11 10:12:48-04 \$");
?>
</div>
</body>
</html>
开发者ID:jjmcd,项目名称:mi-arpsc,代码行数:30,代码来源:AdjustMembers.php
示例15: getID
<?php
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
echo "<board>\n";
include "../ConDBi.php";
/*
==============================================
POST VARS
==============================================
*/
$uid = $_POST["uid"];
$id = getID($application);
$title = $_POST["title"];
$content = $_POST["content"];
/*
==============================================
INSERT REPLY
==============================================
*/
$stmt->prepare("INSERT INTO Board.board\n\t\t\t\t\tSELECT \n\t\t\t\t\t\t'', #uid(auto_increment)\n\t\t\t\t\t\tpid,\n\t\t\t\t\t\tapplication,\n\t\t\t\t\t\tcategory,\n\t\t\t\t\t\t\n\t\t\t\t\t\t?, #--> id\n\t\t\t\t\t\t?, #--> title\n\t\t\t\t\t\t?, #--> content\n\t\t\t\t\t\tnow(), #timestamp\n\t\t\t\t\t\t0, #hit\n\t\t\t\t\t\t\n\t\t\t\t\t\tCASE\n\t\t\t\t\t\t\tWHEN right_depth IS NULL THEN\n\t\t\t\t\t\t\t\tCONCAT(depth, 'A')\n\t\t\t\t\t\t\tELSE\n\t\t\t\t\t\t\t\tCONCAT(depth, CHAR(ASCII(right_depth) + 1))\n\t\t\t\t\t\tEND depth,\n\t\t\t\t\t\t1 #live\n\t\t\t\t\tFROM\n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT B.application, B.category, B.pid, B.depth, right(D.depth, 1) right_depth\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tBoard.board B LEFT OUTER JOIN Board.board D\n\t\t\t\t\t\t\t\tON B.pid = D.pid AND\n\t\t\t\t\t\t\t\t\tlength(D.depth) = length(B.depth) + 1 AND\n\t\t\t\t\t\t\t\t\tlocate(B.depth, D.depth) = 1\n\t\t\t\t\t\t\tWHERE B.uid = ? #parent uid -> as a role of fid\n\t\t\t\t\t\t\tORDER BY D.depth DESC LIMIT 1\n\t\t\t\t\t) P");
$stmt->bind_param("sssd", $id, $title, $content, $uid);
$stmt->execute();
$result = getResult($stmt);
echo "\t<result>" . $result . "</result>\n";
echo "</board>";
$stmt->close();
$mysqli->close();
开发者ID:samchon,项目名称:timetable,代码行数:26,代码来源:reply.php
示例16: querySQL
function querySQL($statement)
{
global $storno, $wait, $author, $cellid, $repeatid, $id, $value, $field, $searchquery;
$today = date('Y-m-d');
$yesterday = date('Y-m-d', time() - 86400);
$before_yesterday = date('Y-m-d', time() - 172800);
switch ($statement) {
case 'availability':
$result = query("SELECT reservation_time, SUM(reservation_pax) AS pax_total, COUNT(reservation_id) AS tbl_total\n\t\t\t\t\t\t\tFROM `reservations` \n\t\t\t\t\t\t\tWHERE `reservation_hidden` = '0' \n\t\t\t\t\t\t\tAND `reservation_wait` = '0' \n\t\t\t\t\t\t\tAND `reservation_outlet_id` = '%d' \n\t\t\t\t\t\t\tAND `reservation_date` = '%s'\n\t\t\t\t\t\t\tAND ( NOT `reservation_status` = 'DEP' AND NOT `reservation_status` = 'NSW')\n\t\t\t\t\t\t\tAND `reservation_id` != '%d'\n\t\t\t\t\t\t\tGROUP BY `reservation_time`\n\t\t\t\t\t\t\tORDER BY `reservation_time` ASC", $_SESSION['outletID'], $_SESSION['selectedDate'], $_SESSION['resID']);
return getRowList($result);
break;
case 'passerby_availability':
$result = query("SELECT reservation_time, SUM(reservation_pax) AS passerby_total\n\t\t\t\t\t\t\tFROM `reservations` \n\t\t\t\t\t\t\tWHERE `reservation_hidden` = '0' \n\t\t\t\t\t\t\tAND `reservation_wait` = '0' \n\t\t\t\t\t\t\tAND `reservation_outlet_id` = '%s' \n\t\t\t\t\t\t\tAND `reservation_date` = '%s'\n\t\t\t\t\t\t\tAND ( NOT `reservation_status` = 'DEP' AND NOT `reservation_status` = 'NSW')\n\t\t\t\t\t\t\tAND `reservation_hotelguest_yn` = 'PASS'\n\t\t\t\t\t\t\tGROUP BY `reservation_time`\n\t\t\t\t\t\t\tORDER BY `reservation_time` ASC", $_SESSION['outletID'], $_SESSION['selectedDate']);
return getRowList($result);
break;
case 'maxcapacity':
$out1 = array();
$result = query("SELECT outlet_max_capacity, outlet_max_tables, passerby_max_pax FROM `outlets` \n\t\t\t\t\t\t\tWHERE `outlet_id`='%d'", $_SESSION['outletID']);
$out1 = getRowListarray($result);
$result = query("SELECT outlet_child_tables, outlet_child_capacity, outlet_child_passer_max_pax FROM `maitre` \n\t\t\t\t\t\t\tWHERE `maitre_outlet_id`='%d' \n\t\t\t\t\t\t\tAND `maitre_date`='%s'", $_SESSION['outletID'], $_SESSION['selectedDate']);
$out2 = getRowListarray($result);
if (is_array($out1) && is_array($out2)) {
return array_merge($out1, $out2);
} else {
return $out1;
}
break;
case 'passerby_max_pax':
$result = query("SELECT sum(reservation_pax) FROM reservations \n\t\t\t\t\t\t\tWHERE `reservation_date`='%s' \n\t\t\t\t\t\t\tAND `reservation_outlet_id`='%d' \n\t\t\t\t\t\t\tAND `reservation_hidden`=0 \n\t\t\t\t\t\t\tAND `reservation_wait`=0 \n\t\t\t\t\t\t\tAND `reservation_hotelguest_yn`='PASS' \n\t\t\t\t\t\t\t", $_SESSION['selectedDate'], $_SESSION['outletID']);
return getResult($result);
break;
case 'max_id':
$result = query("SELECT MAX(reservation_id) FROM reservations\n\t\t\t\t\t\t\tWHERE `reservation_date`='%s' \n\t\t\t\t\t\t\tAND `reservation_outlet_id`='%d' \n\t\t\t\t\t\t\tAND `reservation_hidden`=0 \n\t\t\t\t\t\t\t", $_SESSION['selectedDate'], $_SESSION['outletID']);
return getResult($result);
break;
case 'standard_outlet':
$result = query("SELECT outlet_id FROM `outlets` \n\t\t\t\t\t\t\tWHERE `property_id` = '%d' \n\t\t\t\t\t\t\tAND ( `saison_year` = 0 OR `saison_year` = YEAR(NOW()) )\n\t\t\t\t\t\t\tAND saison_start <= '%d' \n\t\t\t\t\t\t\tAND saison_end >= '%d' \n\t\t\t\t\t\t\tORDER BY outlet_id LIMIT 1", $_SESSION['property'], $_SESSION['selectedDate_saison'], $_SESSION['selectedDate_saison']);
return getResult($result);
break;
case 'web_standard_outlet':
$result = query("SELECT outlet_id FROM `outlets` \n\t\t\t\t\t\t\tWHERE `property_id` = '%d' \n\t\t\t\t\t\t\tAND ( `saison_year` = 0 OR `saison_year` = YEAR(NOW()) )\n\t\t\t\t\t\t\tAND `webform` ='1' \n\t\t\t\t\t\t\tORDER BY outlet_name DESC LIMIT 1", $_SESSION['property']);
return getResult($result);
break;
case 'num_outlets':
$result = query("SELECT COUNT(*) FROM `outlets` \n\t\t\t\t\t\t\tWHERE ( `saison_year` = 0 OR `saison_year` = '%d' )\n\t\t\t\t\t\t\tAND `property_id` ='%d'\n\t\t\t\t\t\t\tAND `webform` = '1'", $_SESSION['selectedDate_year'], $_SESSION['property']);
return getResult($result);
break;
case 'check_web_outlet':
$result = query("SELECT COUNT(*) FROM `outlets` \n\t\t\t\t\t\t\tWHERE ( `saison_year` = 0 OR `saison_year` = '%d' )\n\t\t\t\t\t\t\tAND `outlet_id` ='%d'\n\t\t\t\t\t\t\tAND `webform` = '1'", $_SESSION['selectedDate_year'], $_SESSION['outletID']);
return getResult($result);
break;
case 'property_id_outlet':
$result = query("SELECT `property_id` FROM `outlets` \n\t\t\t\t\t\t\tWHERE `outlet_id` ='%d'", $_SESSION['outletID']);
return getResult($result);
break;
case 'security_outlet':
$result = query("SELECT COUNT(*) FROM `outlets` \n\t\t\t\t\t\t\tWHERE ( `saison_year` = 0 OR `saison_year` = '%d' )\n\t\t\t\t\t\t\tAND `property_id` ='%d'\n\t\t\t\t\t\t\tAND `outlet_id` ='%d'\n ", $_SESSION['selectedDate_year'], $_SESSION['property'], $_SESSION['outletID']);
return getResult($result);
break;
case 'db_outlet':
$result = query("SELECT outlet_name FROM `outlets` WHERE `outlet_id` ='%d' AND `property_id` ='%d' LIMIT 1", $_SESSION['outletID'], $_SESSION['property']);
return getResult($result);
break;
case 'db_prop_pic':
$result = query("SELECT img_filename FROM `properties` WHERE `id` ='%d' LIMIT 1", $_SESSION['property']);
return getResult($result);
break;
case 'db_property':
$result = query("SELECT name FROM `properties` WHERE `id` ='%d' LIMIT 1", $_SESSION['property']);
return getResult($result);
break;
case 'db_outlets':
$result = query("SELECT * FROM `outlets` \n\t\t\t\t\t\t\tWHERE ( `saison_year` = 0 OR `saison_year` = '%d' )\n\t\t\t\t\t\t\tAND `property_id` ='%d' \n\t\t\t\t\t\t\tORDER BY outlet_name", $_SESSION['selectedDate_year'], $_SESSION['property']);
return getRowList($result);
break;
case 'db_outlets_web':
$result = query("SELECT outlet_id, outlet_name, outlet_description, cuisine_style, saison_start, saison_end \n\t\t\t\t\t\t\tFROM `outlets` \n\t\t\t\t\t\t\tWHERE ( `saison_year` = 0 OR `saison_year` = '%d' )\n\t\t\t\t\t\t\tAND `property_id` ='%d'\n\t\t\t\t\t\t\tAND `webform` = '1'\n\t\t\t\t\t\t\tORDER BY outlet_name", $_SESSION['selectedDate_year'], $_SESSION['property']);
return getRowList($result);
break;
case 'db_all_outlets':
$result = query("SELECT outlet_id, outlet_name, outlet_description, cuisine_style, \n\t\t\t\t\t\t\toutlet_max_capacity, outlet_max_tables, outlet_open_time, outlet_close_time, \n\t\t\t\t\t\t\tsaison_start, saison_end, saison_year, webform, avg_duration \n\t\t\t\t\t\t\tFROM `outlets` \n\t\t\t\t\t\t\tWHERE `property_id` ='%d' \n\t\t\t\t\t\t\tAND ( `saison_year` = 0 OR `saison_year` = '%d' )\n\t\t\t\t\t\t\tORDER BY saison_year ASC, outlet_name ASC", $_SESSION['property'], $_SESSION['selectedDate_year']);
return getRowList($result);
break;
case 'db_all_outlets_old':
$result = query("SELECT outlet_id, outlet_name, outlet_description, cuisine_style, \n\t\t\t\t\t\t\toutlet_max_capacity, outlet_max_tables, outlet_open_time, outlet_close_time, \n\t\t\t\t\t\t\tsaison_start, saison_end, saison_year, webform, avg_duration \n\t\t\t\t\t\t\tFROM `outlets` \n\t\t\t\t\t\t\tWHERE `property_id` ='%d' \n\t\t\t\t\t\t\tAND `saison_year` < '%d'\n\t\t\t\t\t\t\tAND `saison_year` != 0\n\t\t\t\t\t\t\tORDER BY saison_year ASC, outlet_name ASC", $_SESSION['property'], $_SESSION['selectedDate_year']);
return getRowList($result);
break;
case 'db_outlet_info':
$result = query("SELECT outlet_id, outlet_name, property_id, outlet_description, outlet_description_en,\t \n\t\t\t\t\t\tcuisine_style, property_id, outlet_max_capacity, outlet_max_tables, outlet_open_time, \t \n\t\t\t\t\t\toutlet_close_time, outlet_timestamp, outlet_closeday, saison_start, saison_end, \t \t \n\t\t\t\t\t\tsaison_year, webform, limit_password, confirmation_email, passerby_max_pax, avg_duration,\t \n\t\t\t\t\t\t1_open_time,1_close_time, 2_open_time,2_close_time, \t \n\t\t\t\t\t\t3_open_time,3_close_time, 4_open_time,4_close_time, \t \n\t\t\t\t\t\t5_open_time, 5_close_time, 6_open_time, 6_close_time, \t \n\t\t\t\t\t\t0_open_time, 0_close_time, 1_open_break, 1_close_break, \t \n\t\t\t\t\t\t2_open_break, 2_close_break, 3_open_break, 3_close_break, \t \n\t\t\t\t\t\t4_open_break, 4_close_break, 5_open_break, 5_close_break, \t \n\t\t\t\t\t\t6_open_break, 6_close_break, 0_open_break, 0_close_break\n\t\t\t\t\t\t\tFROM `outlets` \n\t\t\t\t\t\t\tWHERE `outlet_id` ='%d' \n\t\t\t\t\t\t\tAND `property_id` ='%d' ", $_SESSION['outletID'], $_SESSION['property']);
return getRowListarray($result);
break;
case 'outlet_info':
$result = query("SELECT * FROM `outlets` \n\t\t\t\t\t\t\tLEFT JOIN `properties` on outlets.property_id = properties.id \n\t\t\t\t\t\t\tWHERE `outlet_id` ='%d'\n\t\t\t\t\t\t\tAND `property_id` ='%d' \n\t\t\t\t\t\t\tLIMIT 1", $_SESSION['outletID'], $_SESSION['property']);
return getRowList($result);
break;
case 'db_propery_events':
$result = query("SELECT id, outlet_id, subject,\n\t\t\tdescription, event_date, start_time, end_time,\n\t\t\tadvertise_start, price \n\t\t\t\t\t\t\tFROM `events` \n\t\t\t\t\t\t\tWHERE `property_id` ='%d' \n\t\t\t\t\t\t\tORDER BY `event_date` DESC", $_SESSION['property']);
return getRowList($result);
break;
case 'db_outlet_events':
//.........这里部分代码省略.........
开发者ID:namaris,项目名称:Can_Pages,代码行数:101,代码来源:db_queries.db.php
示例17: MAX
if ($period < 1) {
$SQL = "SELECT MAX(`period`) FROM `netreport`";
$period = singleResult($SQL, $db);
}
echo " <center>\n";
$lastperiod = $period;
echo "<p><h1>Net History</h1></p>\n";
echo "<table width=\"90%\">\n";
echo "<tr><th align=\"left\">Period</th><th>QNI</th><th>QTC" . "</th><th>QTR</th><th>Sess</th><th>Hours</th></tr>\n";
for ($period = $lastperiod; $period > 71; $period--) {
// Display the month name for this report
$SQL = 'SELECT `lastday` FROM `periods` WHERE `periodno`=' . $period;
$periodname = convertDate(singleResult($SQL, $db));
// Get the actual report data for this period
$SQL = 'SELECT B.`netfullname`,A.`QNI`,A.`QTC`,A.`QTR`,A.`sessions`,' . 'A.`updated`,A.`manhours`,A.`netid` ' . 'FROM `netreport` A, `nets` B ' . 'WHERE A.`period`=' . $period . ' AND A.`netID`=B.`netID` ' . 'ORDER BY `QTC` DESC, `QNI` DESC';
$result = getResult($SQL, $db);
// We will use rownum to keep track of light and dark rows
$rownum = 1;
// The following variables are used to calculate totals for the month
$TQNI = 0;
$TQTC = 0;
$TQTR = 0;
$TSess = 0;
$TMH = 0;
// Loop through the rows of the result
while ($myrow = getRow($result, $db)) {
// Update the latest data date, if necessary
if ($myrow[5] > $maxdate) {
$maxdate = $myrow[5];
}
// Calculate totals for the obvious ones
开发者ID:jjmcd,项目名称:mi-nts,代码行数:31,代码来源:nettotals.php
示例18: getResult
$ypos += 22;
}
$SQL2 = "SELECT `day_of_week`,`call` FROM `rep_liaisons` WHERE " . "`net`=3 ORDER BY `day_of_week`";
$res2 = getResult($SQL2, $db);
while ($row2 = getRow($res2, $db)) {
$ypos = 43 + 22 * $row2[0];
ImageString($image, $fontbody, 130, $ypos, $row2[1], $callcolor);
}
$SQL3 = "SELECT `day_of_week`,`call` FROM `rep_liaisons` WHERE " . "`net`=4 ORDER BY `day_of_week`";
$res3 = getResult($SQL3, $db);
while ($row3 = getRow($res3, $db)) {
$ypos = 43 + 22 * $row3[0];
ImageString($image, $fontbody, 220, $ypos, $row3[1], $callcolor);
}
$SQL4 = "SELECT `day_of_week`,`call` FROM `rep_nws` ORDER BY `day_of_week`";
$res4 = getResult($SQL4, $db);
while ($row4 = getRow($res4, $db)) {
$ypos = 43 + 22 * $row4[0];
ImageString($image, $fontbody, 300, $ypos, $row4[1], $callcolor);
}
// Black box around the image
ImageLine($image, 4, $ih - 1, $iw - 1, $ih - 1, $gray4);
ImageLine($image, 3, $ih - 2, $iw - 1, $ih - 2, $gray3);
ImageLine($image, 2, $ih - 3, $iw - 1, $ih - 3, $gray2);
ImageLine($image, 1, $ih - 4, $iw - 1, $ih - 4, $gray1);
ImageLine($image, $iw - 4, 1, $iw - 4, $ih - 4, $gray1);
ImageLine($image, $iw - 3, 2, $iw - 3, $ih - 3, $gray2);
ImageLine($image, $iw - 2, 3, $iw - 2, $ih - 2, $gray3);
ImageLine($image, $iw - 1, 4, $iw - 1, $ih - 1, $gray4);
ImageLine($image, 1, 1, $iw - 5, 1, $black);
ImageLine($image, $iw - 5, 1, $iw - 5, $ih - 5, $black);
开发者ID:jjmcd,项目名称:mi-nts,代码行数:31,代码来源:rep_img_for_QMN.php
示例19: getResult
<?php
require_once 'ResultTree.php';
require_once 'mockresults.php';
// Get the mock result.
$result = getResult();
// Create our tree...
$tree = new ResultTree($result);
// Print out the tree.
print_r($tree->getTree());
// Print out the tree with a filter.
print_r($tree->getTree(4));
// Now print out the flat results.
print_r($tree->getFlat(0, TRUE));
// Now print out the flat results filtered.
print_r($tree->getFlat(4, TRUE));
开发者ID:phpHaxx,项目名称:ResultTree,代码行数:16,代码来源:index.php
示例20: writeSurveyForUser
function writeSurveyForUser($array, $questionIndex, $row, $isSystemFeedback)
{
$myqindex = $questionIndex;
if ($questionIndex == 9) {
$answerIndex = "q10";
} else {
$questionIndex = strval($questionIndex + 1);
$answerIndex = "q" . $questionIndex;
}
echo "\"" . $array[$myqindex] . "\"\n";
if ($isSystemFeedback == 1) {
echo "\"" . getResult($row[$answerIndex]) . "\"\n";
} else {
echo "\"" . $row[$answerIndex] . "\"\n";
}
}
开发者ID:purdue-epics-wise,项目名称:AMBI,代码行数:16,代码来源:user_accounts.php
注:本文中的getResult函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论