• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getData函数的典型用法代码示例。如果您正苦于以下问题:PHP getData函数的具体用法?PHP getData怎么用?PHP getData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: getSummaryDayData

function getSummaryDayData($timestamp = '')
{
    $date = !empty($timestamp) ? date('Y-m-d', $timestamp) : date('Y-m-d');
    $arrQuery = array('created_d' => $date);
    $retval = getData($arrQuery);
    return $retval;
}
开发者ID:huycao,项目名称:yoplatform,代码行数:7,代码来源:summary_ad_request.php


示例2: getPlayer

 public static function getPlayer($gt, $platform)
 {
     $url = 'http://www.bungie.net/Platform/Destiny/SearchDestinyPlayer/' . $platform . '/' . $gt;
     $r = json_decode(getData($url));
     $p = new Player($r->Response[0]->iconPath, $r->Response[0]->membershipType, $r->Response[0]->membershipId, $r->Response[0]->displayName);
     return $p;
 }
开发者ID:Ryangr0,项目名称:lightcalc-destiny,代码行数:7,代码来源:Destiny.php


示例3: reset

 public function reset()
 {
     $_SESSION['pk'] = 10;
     // <-- start fake pks at 10
     $_SESSION['rs'] = getData();
     // <-- populate $_SESSION with data.
 }
开发者ID:phpsong,项目名称:DeviceManagementSystem,代码行数:7,代码来源:session_db.php


示例4: email

function email()
{
    $headers = "From: [email protected]\r\n";
    $headers .= "Content-type: text/html charset=iso-8859-1 \r\n";
    $query = "select order_id, room_no, CONCAT(fname,' ', mname ,' ', lname) as cust_name ,phone_no,Adults, Child_A from reservation inner join customer on reservation.cust_id=customer.cust_id where arrival_date='" . date('Y-m-d 11:00:00') . "' and reservation.status='active'";
    $guest = getData($query);
    if (!empty($guest)) {
        $message = '
    <html>
    <head>
      <title>Some title</title>
    </head>
    <body>
      <table>
		<caption>Guests Arriving Today</caption>
		<thead>
		<tr><th>Room_no</th>
		<th>Customer Details</th>
		<th>Contacts</th>
		<th>Adults</th>
		<th>Children</th></tr>
		</thead>';
        $table = '';
        foreach ($guest as $value) {
            $table .= '<tbody><tr><td>' . $value['room_no'] . '</td><td>' . $value['cust_name'] . '</td><td>' . $value['phone_no'] . '</td><td>' . $value['Adults'] . '</td><td>' . $value['Child_A'] . '</td></tr></tbody>';
        }
        $table .= '</table></html>';
        $msg = $message . $table;
        // use wordwrap() if lines are longer than 70 characters
        $msg = wordwrap($msg, 70);
        // send email
        mail("[email protected]", "Guests Arriving today", $msg, $headers);
    }
}
开发者ID:benkip,项目名称:Reservation-system,代码行数:34,代码来源:lib.php


示例5: lookup

function lookup($date)
{
    $temp = split("/", $date);
    $monthname = $temp[0] . $temp[1];
    $folder = "./data/{$monthname}";
    $drc = dir($folder);
    $datas = array();
    $count = 0;
    if ($drc != null) {
        while ($fl = $drc->read()) {
            $lfl = $folder . "/" . $fl;
            $din = pathinfo($lfl);
            if ($fl != ".." && $fl != ".") {
                $temp = getData($folder . "/" . $fl);
                $rec = array();
                foreach ($temp as $data) {
                    list($key, $value) = split('":"', $data);
                    $key = stlipQuot($key);
                    $value = stlipQuot($value);
                    $rec[$key] = $value;
                }
                $datas[] = $rec;
                $count++;
            }
        }
        $drc->close();
    }
    if ($count > 0) {
        $datas = JEncode($datas);
        echo '({"total":"' . $count . '","results":' . $datas . '})';
    } else {
        echo '({"total":"0","results":""})';
    }
}
开发者ID:npucc,项目名称:onyoku,代码行数:34,代码来源:note.php


示例6: getLeaderboardIdFromSteam

function getLeaderboardIdFromSteam($date = 0)
{
    global $config;
    $url = $config['leaderboards']['baseUrl'] . '?xml=1';
    $lbName = date('Ymd') . '_scores';
    // don't look at me like that
    try_again:
    $data = getData($url);
    $xml = new SimpleXMLElement($data);
    $lbid = '';
    // since leaderboards are being created in advance by the devs, we need to
    // make sure we're getting a valid one, where 'valid' means with at least
    // 50 entries - we'd get an empty one at midnight otherwise.
    foreach ($xml as $x) {
        if ($date == 1) {
            $lbName = date('Ymd', strtotime('-1 day', strtotime(date('r')))) . '_scores';
        }
        if ($x->name == $lbName) {
            if ($x->entries < 50) {
                echo "[{$x->name} has {$x->entries} entries, something's up]\n";
                //sleep(5);
                //goto try_again;
            }
            return $x->lbid;
        }
    }
}
开发者ID:eur0pa,项目名称:afterbirth-leaderboards,代码行数:27,代码来源:utils.php


示例7: checkTweets

function checkTweets($newsitem)
{
    $backtweet_api_key = "93cf9404dc4d8aebe92f";
    $q = $newsitem["url"];
    $newsitem_id = $newsitem["id"];
    echo "querying: " . $q . "<br>";
    $sinceString = "";
    $since_result = mysql_query("SELECT * FROM backtweets_db WHERE newswire_id=" . $newsitem_id . " ORDER BY tweet_id DESC LIMIT 1");
    if ($since_result) {
        $since_row = mysql_fetch_assoc($since_result);
        $since_id = $since_row["tweet_id"];
        $sinceString .= "&since_id=" . $since_id;
    }
    echo "<br>since string: " . $sinceString . " since_id: " . $since_id . "<br>";
    $jsonString = getData("http://backtweets.com/search.json?q=" . $q . "&key=" . $backtweet_api_key . "&itemsperpage=100" . $sinceString);
    $tweetsObj = json_decode($jsonString);
    //echo "status: ".$tweetsObj->status;
    //echo $jsonString;.
    echo "total results: " . $tweetsObj->totalresults . "<br>";
    //$indexable = 1;
    //if ($tweetsObj->totalresults < 1) {
    //	if ($newsitem["indexed"] > 2) {
    //$indexable = 0;
    //	}
    //}
    //mysql_query( "UPDATE newswire_tb SET indexable=".$indexable.", indexed=indexed+1 WHERE id=".$newsitem["id"] );
    for ($i = 0; $i < count($tweetsObj->tweets); $i++) {
        //	echo $tweetsObj->tweets[$i]->tweet_from_user ."<br>";
        echo "<br>Tweet: since id : " . $sinceString . "<br>";
        insertTweet($tweetsObj->tweets[$i], $newsitem["id"]);
        echo "<br><br>";
    }
}
开发者ID:bruzed,项目名称:tweetcatcha,代码行数:33,代码来源:backTweetsParser.php


示例8: loginOverride

function loginOverride($coreUserInfo)
{
    global $gasDatabaseName, $CoreUserTableName;
    if ($coreUserInfo["ErrorCode"] == 0) {
        $uid = $coreUserInfo["Result"]["Uid"];
        connectDB($gasDatabaseName);
        $sql = "select * from {$CoreUserTableName} where Uid = '{$uid}'";
        $data = getData($sql);
        $info = array();
        if (!empty($data)) {
            $data = $data[0];
            foreach ($data as $key => $value) {
                $info["{$key}"] = $value;
            }
        } else {
            printResultByMessage("用戶未註冊", 1001);
        }
        foreach ($coreUserInfo["Result"] as $key => $value) {
            $info["{$key}"] = $value;
        }
        $_SESSION["Info"] = $info;
        echo json_encode($coreUserInfo);
        die;
    }
}
开发者ID:qichangjun,项目名称:HTMLLearn,代码行数:25,代码来源:function.php


示例9: dekodieren

function dekodieren($in)
{
    global $ks_hilf;
    $conn = new PDO('sqlite:' . $ks_hilf[pfad] . '/navajo.sqlite');
    $buffer = explode(' ', trim($in));
    $cc = 0;
    foreach ($buffer as $key => $value) {
        $sql = 'SELECT count(*) AS NUM FROM data WHERE NAVAJO LIKE "' . $value . '" ORDER BY RANDOM() LIMIT 1';
        $data = getData($conn, $sql);
        $temp = $data[0][NUM];
        $cc++;
        if ($temp == 0) {
            $out .= '[' . $value . ']';
        } else {
            $sql = 'SELECT * FROM data WHERE NAVAJO = "' . $value . '" ORDER BY RANDOM() LIMIT 1';
            $data = getData($conn, $sql);
            $tmp = $data[0][ENGLISCH];
            if ($tmp == "SPACE") {
                $tmp = " ";
            }
            $out .= $tmp;
        }
    }
    return trim($out);
}
开发者ID:fschell,项目名称:cryptool-online,代码行数:25,代码来源:navajo.coder.php


示例10: GetPostInfo

 public static function GetPostInfo($id)
 {
     try {
         $safeId = ensureInt($id, 10);
     } catch (Exception $e) {
         throw new Exception('获取墙贴信息失败:' . $e->getMessage());
         return null;
     }
     $cacheKey = 'postinfo_' . $safeId;
     $cache = getCache($cacheKey);
     if ($cache == null) {
         $sql = "select `post_id`,`post_creator`,  `post_wall`, `post_title`, `post_content`, `post_time` from wa_post where post_id = {$safeId} limit 1";
         $ret = getData($sql);
         if ($ret == null) {
             throw new Exception('获取墙贴信息失败。');
             return null;
         } else {
             $ret = $ret[0];
             setCache($cacheKey, $ret);
             return $ret;
         }
     } else {
         return $cache;
     }
 }
开发者ID:bdbai,项目名称:wawall-sae,代码行数:25,代码来源:wa-post.php


示例11: getCmd

/**
 * 
 * @param unknown $httpReq
 */
function getCmd($httpReq)
{
    $reqdecoded = getData($httpReq);
    if (!isset($reqdecoded['cmd'])) {
        WrongRequestException::throwException(8010, '>cmd< is missing in request', 'got: ' . $httpReq);
    }
    return $reqdecoded['cmd'];
}
开发者ID:ppschweiz,项目名称:vvvote,代码行数:12,代码来源:getcmd.php


示例12: __construct

 function __construct()
 {
     session_start();
     if (!isset($_SESSION['pk'])) {
         $_SESSION['pk'] = 5;
         $_SESSION['rs'] = getData();
     }
 }
开发者ID:rpijnenburg,项目名称:Restler,代码行数:8,代码来源:sessiondb.php


示例13: page

 public function page()
 {
     $this->dbinfo = \H::getJSONData("credentials");
     if (getData("credentials") != null && $this->connect($this->dbinfo)) {
         $this->set = true;
     }
     return "auto";
 }
开发者ID:saviobosco,项目名称:lobby,代码行数:8,代码来源:App.php


示例14: adicionar

 public function adicionar($conexao, $acao, $oQue, $quem, $qual)
 {
     try {
         $timestamp = getTimestamp();
         $conexao->query()->from("logs")->save(array("acao" => $acao, "oque" => $oQue, "quem" => $quem, "qual" => $qual, "data" => getData($timestamp), "timestampData" => $timestamp));
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:saulor,项目名称:cpbquirophp,代码行数:9,代码来源:LogDAO.php


示例15: __construct

 public function __construct()
 {
     if (!isset($_SESSION['pk'])) {
         $_SESSION['pk'] = 10;
         // <-- start fake pks at 10
         $_SESSION['rs'] = getData();
         // <-- populate $_SESSION with data.
     }
 }
开发者ID:Symb1OS,项目名称:traindiary,代码行数:9,代码来源:session_db.php


示例16: addData

function addData($table_name, $data, $time, $date, $user)
{
    $status = isPublic();
    if ($table_name == "list") {
        mysql_query("INSERT INTO {$table_name} (details, time_posted , date_posted , user, status) VALUES ('{$data}', '{$time}', '{$date}', '{$user}', '{$status}')") or die(mysql_error());
    } else {
        $post_id = getData('post_id');
        mysql_query("INSERT INTO {$table_name} (details, time_posted , date_posted , user, post_id) VALUES ('{$data}', '{$time}', '{$date}', '{$user}', '{$post_id}')") or die(mysql_error());
    }
}
开发者ID:jonycodes,项目名称:Blog,代码行数:10,代码来源:add.php


示例17: main

function main()
{
    $data = getData();
    array_shift($data);
    // shift off the first "headers" row
    foreach ($data as $record) {
        $result = parseDBLine($record);
        magicalInsert($result);
    }
}
开发者ID:ChapResearch,项目名称:Online-Orders-Database,代码行数:10,代码来源:import.php


示例18: saveTorrent

function saveTorrent($url)
{
    global $destDir;
    // get filename from http://showrss.karmorra.info/r/67849b94daf750c142adf43266525b3a.torrent
    $matches = split("/", $url);
    $filename = $matches[count($matches) - 1];
    $torData = getData($url);
    // write to disk
    writeBack($destDir . $filename, $torData);
}
开发者ID:naseemr,项目名称:torrent_dl,代码行数:10,代码来源:showrssFetch.php


示例19: getTranslation

function getTranslation($project, $resource, $lang)
{
    $data = getData('/api/2/project/' . $project . '/resource/' . $resource . '/translation/' . $lang . '/');
    if (!$data['content']) {
        throw new Exception('Invalid response');
    }
    return json_decode($data['content'], true);
    // echo $data['content']; exit;
    /* eval('?>' . $data['content'] . '<?'); */
    // return $LANG;
}
开发者ID:r4mp,项目名称:Foodle,代码行数:11,代码来源:dict-loadtrans.php


示例20: merge

 public function merge($entity)
 {
     $table = getTable($entity);
     $data = getData($entity);
     $idColumn = key($data);
     $id = array_shift($data);
     $where = buildWhere($idColumn, $id);
     $update = $this->conn->update($table, $data);
     $return = $update->where($where, $id)->execute();
     return $return;
 }
开发者ID:skvaros,项目名称:test,代码行数:11,代码来源:EntityManager.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getDataFromSQL函数代码示例发布时间:2022-05-15
下一篇:
PHP getDBValidationData函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap