我尝试在这里按以下顺序显示数据:
作者姓名
书名
Url
注意:每一条数据都有许多结果。我不确定当它们被获取时,它们是如何存储在数组中的。
正如您将看到的,数据库模式是关系型的,它连接来自数据库不同区域的这些信息。
正如你所想的那样,我是编程新手。
我在这里不知所措。
下面是我的代码:
<?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
}
}
?>发布于 2010-03-03 00:49:45
我想您需要一些UI控件,以便将data_row中的数据绑定到这些控件上。换句话说,你需要在屏幕上有一些占位符。
诚挚的问候
发布于 2010-03-03 00:50:31
您正在获取我的关联数组,所以这无关紧要。您可以按键引用数组项,并随时随地使用它。
您不必担心数组是如何排序的。
https://stackoverflow.com/questions/2364918
复制相似问题