I have a database that has this structure and data:
#
Table structure for table page_data
#
CREATE TABLE page_data (
id tinyint(4) NOT NULL auto_increment,
page varchar(200) default NULL,
title varchar(200) default NULL,
heading varchar(225) default NULL,
content text,
heading2 varchar(225) default NULL,
content2 text,
PRIMARY KEY (id),
UNIQUE KEY id (id)
) TYPE=MyISAM;
#
Dumping data for table page_data
#
INSERT INTO page_data VALUES (1, 'home', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
INSERT INTO page_data VALUES (2, 'page2', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
INSERT INTO page_data VALUES (3, 'page3', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
INSERT INTO page_data VALUES (4, 'page4', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
INSERT INTO page_data VALUES (5, 'page5', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
INSERT INTO page_data VALUES (6, 'contact', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
INSERT INTO page_data VALUES (7, 'faq', 'replace this with your webpage title', 'This is the heading', 'and this is the content that you will replace', 'This is the second header', 'This is the second content area');
I have a script that shows the pages (faq, contact, page2, etc) and lists them according to how the database is setup. It will list them from the top down.
The goal is to alphabetize the pages that are being printed out.
Here are the lines I believe to be responsible:
================================
// print the list if there is no editing
$result = mysql_query("SELECT * FROM page_data",$dbh);
while ($myrow = mysql_fetch_array($result)) {
printf("<a href=\"%s?id=%s\">%s </a> \n", $PHP_SELF, $myrow["id"], $myrow["page"]);
printf("<a href=\"%s?id=%s&delete=yes\">(DELETE)</a><br>", $PHP_SELF, $myrow["id"]);
=============================
Is it possible?
Thanks!