doudou0111 2015-11-07 02:35
浏览 7

从同一数据库中的不同表中获取数据PHP [关闭]

So here's my problem, I'm trying to fetch data from different tables, I already wrote the code for fetching from one table, but I couldn't fetch another data from the other table, here is my code:

    $q = mssql_query("SELECT fdExp, fdGameMoney, fdUserNum FROM UserInfoGame WHERE fdUserNum = '".$_SESSION['fdUserNum']."'");
    <div class="login2" style="color:#a1a1a1;">
    <font size="3"><div style="font-size:16px; margin-left:10px;">Welcome, <?php echo $_SESSION['username']; ?></div></font>
    <div style="font-size:14px; margin-left:15px; margin-top:5px;">
        <font size="2">TR: <?php echo mssql_result($q, 0, 'fdGameMoney'); ?>
        <div style="margin-top:-5px;">Exp: <?php echo mssql_result($q, 0, 'fdExp'); ?></div>
        <div style="margin-top:-5px;">UserNum: <?php echo mssql_result($q, 0, 'fdUserNum'); ?></div>
        <div style="margin-left:5px;">

the other table called "" and the rows are "MC" and "usernum" the code should check the usernum if it's the same it gonna fetch the data of how much mc he got..

  • 写回答

1条回答 默认 最新


      相关推荐 更多相似问题


      • ¥15 ME21N 创建采购成功并且生成采购订单号,但显示“快件文档更新已取消”,SM13看错误提示为如下截图:
      • ¥30 android 集成fmod实现变声功能中遇到的问题
      • ¥60 matlab传染病模型分段
      • ¥15 关于#matlab#的问题,如何解决?
      • ¥15 51单片机汇编语言Keil5基础问题!
      • ¥15 CygwinPortable 中 NumPy 无法安装
      • ¥15 vivado如何支持多维打包数组模式
      • ¥15 请问第13题到底应该怎么做
      • ¥15 倒计时汇编语言RTC实时时钟
      • ¥15 CCS安装出现Failed to create the part's controls