本文整理汇总了PHP中SqlHelper::pdo_fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlHelper::pdo_fetch方法的具体用法?PHP SqlHelper::pdo_fetch怎么用?PHP SqlHelper::pdo_fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlHelper
的用法示例。
在下文中一共展示了SqlHelper::pdo_fetch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SqlHelper
<?php
include "./mysql.php";
include "./message.php";
session_start();
if ($_REQUEST['account'] != "") {
$account = $_REQUEST['account'];
$password = $_REQUEST['password'];
$SqlHelper = new SqlHelper();
$sql = 'select * from ims_xingfit_merchant_user where account = "' . $account . '" and password = "' . $password . '"';
$res = $SqlHelper->pdo_fetch($sql);
if ($res['merchantId'] != "") {
$_SESSION['merchantId'] = $res['merchantId'];
$sql2 = 'select * from ims_xingfit_merchant_info where merchantId = "' . $_SESSION['merchantId'] . '"';
$res2 = $SqlHelper->pdo_fetch($sql2);
$_SESSION['logo'] = $res2['merchantLogo'];
$_SESSION['username'] = $res2['merchantName'];
include "./navigation.html";
} else {
message('用户名或密码错误', './login.html', 'error');
}
$SqlHelper->close_connect();
} else {
include "./navigation.html";
}