Hi
Here is a code snippet with my query...
// retrieve the two most recent articles from technology
$result = mysql_query("select TBArticle.ArticleSubject, TBArticle.ArticleDateTime from TBArticle, subjectlist where subjectlist.subject_name='Technology'");
$rows = mysql_num_rows($result);
for ($i = 0; $i < $rows; $i++)
{
$data = mysql_fetch_row($result);
echo "$data[0], $data[1], $data[2]<br>\n";
}
......................................................................................
Its the query that concerns me. I am wondering if it is actually possible to get the correct result from the database in the first place. Here are the table specs....
subjectlist
subjectid: integer, Primary Key
subject_name: 8 Categories for Technology, Enterprise, etc.
TBArticle
ArticleId int(11) NOT NULL auto_increment
NodeId bigint(20) NOT NULL default '0'
ArticleWriter varchar(255) default NULL
ArticleDateTime datetime NOT NULL default '000-00-00 00:00:00
ArticleSubject varchar(255) NOT NULL default ''
ArticleBody longtext
PRIMARY KEY (ArticleId)
TBTree
CategoryName varchar(255) default NULL
NodeId bigint(20) NOT NULL default '0'
ParentNodeId bigint(20) NOT NULL default '0'
Terminal enum ('N','Y') NOT NULL default 'Y'
NodeName varchar(255) NOT NULL default
NodeTip varchar(255) NOT NULL default
......................................................................
TBTree.CategoryName is actually the same as subjectlist.subject_name but in the first one it repeats.
I seem to get variant output depending on which one of these I use in the query. CategoryName hits me with sometimes 20 of each match.
Thanks to anyone who even looks at this one... 🙂