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


PHP DataBase::fetchAssoc方法代码示例

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


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

示例1: TableData

function TableData($Table)
{
    $DB = new DataBase();
    $DB->Connect();
    $RsData = $DB->fetchAssoc("data", $Table);
    foreach ($RsData as $ID => $Row) {
        $Type = explode("(", $Row['type']);
        $Row['type'] = $Type[0];
        $TableData[$Row['field']] = $Row['type'];
    }
    return $TableData;
}
开发者ID:javzero,项目名称:admin,代码行数:12,代码来源:func.common.php

示例2: DataBase

<?php

session_name('testml');
session_start();
// session_destroy();
// die();
require '../../classes/class.meli.php';
require '../../classes/class.database.php';
$DB = new DataBase();
$DB->Connect();
$URL = 'https://renovatio-cheketo.c9users.io/files/modules/test/landing.php';
//$CallBack = 'https://renovatio-cheketo.c9users.io/files/modules/test/landing.php';
$Meli = new Meli('1204162705833882', '9BSgeYbRpo4PCAOaCqYzhEqPo7354DyY', $_SESSION['access_token'], $_SESSION['refresh_token']);
$UserData = $DB->fetchAssoc("admin_user", "*", "admin_id=8");
$_SESSION['code'] = $UserData[0]['code'];
$_SESSION['access_token'] = $UserData[0]['access_token'];
$_SESSION['refresh_token'] = $UserData[0]['refresh_token'];
$_SESSION['expires_in'] = $UserData[0]['expires_in'];
if (!$_SESSION['code']) {
    header("Location: " . $Meli->getAuthUrl($URL, Meli::$AUTH_URL['MLA']));
    die;
} else {
    if (!$_SESSION['access_token']) {
        // If the code was in get parameter we authorize
        $UserML = $Meli->authorize($_SESSION['code'], $URL);
        // Now we create the sessions with the authenticated user
        $_SESSION['access_token'] = $UserML['body']->access_token;
        $_SESSION['expires_in'] = time() + $UserML['body']->expires_in;
        $_SESSION['refresh_token'] = $UserML['body']->refresh_token;
        $DB->execQuery("UPDATE", "admin_user", "access_token='" . $_SESSION['access_token'] . "', refresh_token='" . $_SESSION['refresh_token'] . "', expires_in=" . $_SESSION['expires_in'], "admin_id=8");
        //echo "AT".$DB->lastQuery();
开发者ID:javzero,项目名称:admin,代码行数:31,代码来源:inc.meli.php


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