Jump to content

Eddie01001

New Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Eddie01001

  • Rank
    Newbie

Profile Information

  • Gender
    Not Telling
  1. Eddie01001

    rss.php

    i got thanks
  2. Eddie01001

    rss.php

    here is my three table data ===================== -- -- Table structure for table `carbon_topics` -- CREATE TABLE IF NOT EXISTS `carbon_topics` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Topic` varchar(255) NOT NULL, `Tags` text, `UserID` int(10) unsigned NOT NULL DEFAULT '0', `UserName` varchar(50) NOT NULL, `LastName` varchar(50) DEFAULT NULL, `PostTime` int(10) unsigned NOT NULL, `LastTime` int(10) unsigned NOT NULL, `IsGood` tinyint(1) unsigned DEFAULT '0', `IsTop` tinyint(1) unsigned DEFAULT '0', `IsLocked` tinyint(1) unsigned DEFAULT '0', `IsDel` tinyint(1) unsigned DEFAULT '0', `IsVote` tinyint(1) unsigned DEFAULT '0', `Views` int(10) unsigned DEFAULT '0', `Replies` int(10) unsigned DEFAULT '0', `Favorites` int(10) unsigned DEFAULT '0', `RatingSum` int(10) unsigned NOT NULL DEFAULT '0', `TotalRatings` int(10) unsigned NOT NULL DEFAULT '0', `LastViewedTime` int(10) unsigned NOT NULL, `PostsTableName` int(10) unsigned DEFAULT NULL, `ThreadStyle` varchar(255) DEFAULT NULL, `Lists` longtext, `ListsTime` int(10) unsigned NOT NULL, `Log` longtext, PRIMARY KEY (`ID`), KEY `LastTime` (`LastTime`,`IsDel`), KEY `UserTopics` (`UserName`,`IsDel`,`LastTime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Table structure for table `carbon_posttags` -- CREATE TABLE IF NOT EXISTS `carbon_posttags` ( `TagID` int(11) DEFAULT '0', `TopicID` int(11) DEFAULT '0', `PostID` int(11) DEFAULT '0', KEY `TagsIndex` (`TagID`,`TopicID`), KEY `TopicID` (`TopicID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -- Table structure for table `carbon_tags` -- CREATE TABLE IF NOT EXISTS `carbon_tags` ( `ID` int(10) unsigned NOT NULL AUTO_INCREMENT, `Name` varchar(255) NOT NULL, `Followers` int(10) unsigned DEFAULT '0', `Icon` tinyint(1) unsigned DEFAULT '0', `Description` mediumtext, `IsEnabled` tinyint(1) unsigned DEFAULT '1', `TotalPosts` int(10) unsigned DEFAULT '0', `MostRecentPostTime` int(10) unsigned NOT NULL, `DateCreated` int(10) unsigned NOT NULL, PRIMARY KEY (`ID`), KEY `TagName` (`Name`) USING HASH, KEY `TotalPosts` (`IsEnabled`,`TotalPosts`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; =================================================== I want select topics from table `carbon_topics` AND only certain tag for example "tag1" here is what I do $sql = "SELECT carbon_topics.Topic, carbon_topics.ID, carbon_topics.Tags FROM carbon_topics WHERE carbon_topics.Tags = '​tag1' "; i think i failed
  3. Eddie01001

    rss.php

  4. Eddie01001

    rss.php

    ok I M New to this and I do have a lot things to learn I have a database named " onesixh3_bbs" and few tables and all the articles are stored in table " carbon_topics" as shown below and another table called " carbon_tags" store all the tags as shown below in this table it has three tags which are " news, questions, help" NOW my question is how to create a rss feed that only fetch articles from table "carbon_tags" AND select from "news" only I dont want articles from other name here is what I m thinking join this two tables and select from carbon_tags.news how to coding this ? thank you so much really appreciate
  5. Eddie01001

    rss.php

    $sql = "SELECT * FROM carbon_topics WHERE carbon_catalog IN SELECT news is something like this? please help I am new and im learning please
  6. Eddie01001

    rss.php

    I have a rss.php for my web site which fetch all articles from all catalog and works fine BUT NOW I want NOT all articles from all catalog I want only catalog " my_catalog_1" I want fetch all articles from " catalog 1 " here is my rss.php now (which work fine fetch all articles) ======================= <?php include('connect.php'); $sql = "SELECT * FROM carbon_topics ORDER BY id DESC LIMIT 20"; $query = mysql_query($sql) or die(mysql_error()); header("Content-type: text/xml"); echo "<?xml version='1.0' encoding='UTF-8'?> <rss version='2.0'> <channel> <title>9lessons | Programming Blog </title> <link>http://example.com</link> <description>Programming Blog </description> <language>en-us</language>"; while($row = mysql_fetch_array($query)) { $Topic=$row['Topic']; $ID=$row['ID']; echo "<item> <title>$Topic</title> <link>http://example.com/t/$ID</link> </item>"; } echo "</channel></rss>"; ?> ===================== here is my database (this database name is forum_catalog) this is the catalog it contains :" news , questions, help " and now I want only fetch articles from table(forum_catalog) =>news how to done that?
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.