首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >帮助在用户页面上显示数据。我想我在这里离题了

问帮助在用户页面上显示数据。我想我在这里离题了
EN

Stack Overflow用户
提问于 2010-03-03 00:46:45
回答 2查看 41关注 0票数 0

我尝试在这里按以下顺序显示数据:

作者姓名

书名

Url

注意:每一条数据都有许多结果。我不确定当它们被获取时,它们是如何存储在数组中的。

正如您将看到的,数据库模式是关系型的,它连接来自数据库不同区域的这些信息。

正如你所想的那样,我是编程新手。

我在这里不知所措。

下面是我的代码:

代码语言:javascript
复制
<?php

//Starting session

session_start();

//Includes mass includes containing all the files needed to execute the full script
//Also shows homepage elements without customs

include ('includes/mass.php');

//Set the  session variable

$username = $_SESSION['username'];


//Check to see if logged in

    if (isset($username))

        {

            //Check all databases assoc with the notes for username submissions

            $sql_for_username_submission = "SELECT notes.authname, notes.bookname, notes.url, notes.note_id, notes.user, smallnotes.chapter_name FROM notes INNER JOIN small_notes ON notes.note_id = small_notes.notes_id AND notes.user = small_notes.user ORDER BY notes.note_id";

            $get_data = mysql_query($sql_for_username_submission);

            while ($data_row = mysql_fetch_assoc($get_data))

                    {

                        $authnames = $data_row['authname']; 

                        Stopped here. not sure how to progress

                    }

        }   


?>
EN

回答 2

Stack Overflow用户

发布于 2010-03-03 00:49:45

我想您需要一些UI控件,以便将data_row中的数据绑定到这些控件上。换句话说,你需要在屏幕上有一些占位符。

诚挚的问候

票数 0
EN

Stack Overflow用户

发布于 2010-03-03 00:50:31

您正在获取我的关联数组,所以这无关紧要。您可以按键引用数组项,并随时随地使用它。

您不必担心数组是如何排序的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2364918

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档