<?php
$dsn = "mysql:host=localhost;dbname=palace_banquet";
$user = "root";
$password = "";
$dbh = new PDO($dsn, $user, $password);
$pdo = new PDO("mysql:host=localhost;dbname=palace_banquet","root","");
$pdo->query("SET NAMES utf8");
$ysql="select n_account from noodles_member where n_username='{$uid}'";
$yarr=$pdo->Query($ysql);
$yarr[0][1];//总额
这里$yarr[0][1]报错
我用pdo链接数据库的
慕斯王
HUX布斯