本文整理汇总了PHP中Utilities::fql方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::fql方法的具体用法?PHP Utilities::fql怎么用?PHP Utilities::fql使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utilities
的用法示例。
在下文中一共展示了Utilities::fql方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
include_once '../common/utilities.php';
$error_messages = array();
$title = 'Facebook album downloader';
$user = $fb->getUser();
$utilities = new Utilities();
if ($user) {
$me = $fb->api('/me');
$title = $me['name'] . ' : ' . $title;
$userlist = $utilities->fql("SELECT uid, name, pic_square FROM user WHERE uid = me() OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())");
} else {
$title = 'Login : ' . $title . '';
$messages['info'][] = 'Please ' . $utilities->url($fb->getLoginUrl(), 'login') . ' to use this app';
}
include "../views/userlist.php";
示例2: Utilities
<?php
include_once '../common/utilities.php';
$uid = $_SESSION['uid'] = $_GET['uid'];
$name = $_GET['name'];
$cols = 4;
$utilities = new Utilities();
$albums = $utilities->fql("SELECT aid, name, cover_pid FROM album WHERE owner = " . $uid);
$pids = array();
for ($i = 0; $i < count($albums); $i++) {
$pids[] = '"' . $albums[$i]['cover_pid'] . '"';
}
$photos = $utilities->fql("SELECT pid, src FROM photo WHERE pid in (" . implode(',', $pids) . ")");
$coverImages = array();
for ($i = 0; $i < count($photos); $i++) {
$coverImages[$photos[$i]['pid']] = $photos[$i]['src'];
}
$title = $name . "'s Albums";
include "../views/albumlist.php";
示例3: isset
<?php
$aid = isset($_GET['aid']) ? $_GET['aid'] : '';
$name = isset($_GET['name']) ? $_GET['name'] : '';
include_once '../common/utilities.php';
if ($aid) {
// user is requesting photos from album
$fql = "SELECT src_small, src_big FROM photo where aid = '" . $aid . "'";
$title = "Album photos : " . $name;
}
$utilities = new Utilities();
$photos = $utilities->fql($fql);
include '../views/photolist.php';